Annotation Interface Link


@Target({}) @Retention(RUNTIME) @Inherited public @interface Link
The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A description of the link.
    The name of this link.
    The name of an existing, resolvable OAS operation, as defined with a unique operationId.
    A relative or absolute reference to an OAS operation.
    Array of parameters to pass to an operation as specified with operationId or identified via operationRef.
    Reference value to a Link object.
    A literal value or {expression} to use as a request body when calling the target operation.
    An alternative server to service this operation.
  • Element Details

    • name

      String name
      The name of this link.

      The name is REQUIRED when the link is defined within Components. The name will be used as the key to add this link to the 'links' map for reuse.

      Returns:
      the link's name
      Default:
      ""
    • operationRef

      String operationRef
      A relative or absolute reference to an OAS operation. This field is mutually exclusive of the operationId field, and must point to an Operation Object. Relative operationRef values may be used to locate an existing Operation Object in the OpenAPI definition. Ignored if the operationId property is specified.
      Returns:
      an operation reference
      Default:
      ""
    • operationId

      String operationId
      The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field.
      Returns:
      an operation ID
      Default:
      ""
    • parameters

      LinkParameter[] parameters
      Array of parameters to pass to an operation as specified with operationId or identified via operationRef.
      Returns:
      the list of parameters for this link
      Default:
      {}
    • description

      String description
      A description of the link. CommonMark syntax may be used for rich text representation.
      Returns:
      the link's description
      Default:
      ""
    • requestBody

      String requestBody
      A literal value or {expression} to use as a request body when calling the target operation.
      Returns:
      the request body of this link
      Default:
      ""
    • server

      Server server
      An alternative server to service this operation.
      Returns:
      the server associated to this link
      Default:
      @org.eclipse.microprofile.openapi.annotations.servers.Server
    • ref

      String ref
      Reference value to a Link object.

      This property provides a reference to an object defined elsewhere. This property and all other properties are mutually exclusive. If other properties are defined in addition to the ref property then the result is undefined.

      Returns:
      reference to a link
      Default:
      ""