Annotation Interface OpenApi.Link

Enclosing class:
OpenApi

@Target({}) @Retention(CLASS) @Documented public static @interface OpenApi.Link
OpenAPI Link Object metadata.

A link must define exactly one of operationRef() or operationId().

Declarative OpenAPI generation supports string-valued link parameters and request bodies. Use OpenApiDocument.LinkBuilder for other OpenAPI value types.

  • Element Details

    • name

      String name
      Link name.
      Returns:
      link name
    • operationRef

      String operationRef
      Operation reference.

      Mutually exclusive with operationId().

      Returns:
      operation reference
      Default:
      ""
    • operationId

      String operationId
      Operation ID.

      Mutually exclusive with operationRef().

      Returns:
      operation ID
      Default:
      ""
    • parameters

      OpenApi.LinkParameter[] parameters
      Parameters passed to the linked operation.
      Returns:
      link parameters
      Default:
      {}
    • requestBody

      String requestBody
      Literal string or runtime expression used as the linked operation request body.
      Returns:
      request body
      Default:
      ""
    • description

      String description
      Link description.
      Returns:
      description
      Default:
      ""