Top Description Methods
org.eclipse.microprofile.openapi.annotations.links

public @Interface Link

extends Annotation
Annotations
@Target
@Retention:RUNTIME
@Inherited
Imports
java.lang.annotation.Inherited, .Retention, .RetentionPolicy, .Target, org.eclipse.microprofile.openapi.annotations.extensions.Extension, org.eclipse.microprofile.openapi.annotations.servers.Server

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
OpenAPI Specification Link Object

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the link's description
description
()

A description of the link.

public Extension[]

Returns:

array of extensions
extensions
()

List of extensions to be added to the Link model corresponding to the containing annotation.

public String

Returns:

the link's name
name
()

The name of this link.

public String

Returns:

an operation ID
operationId
()

The name of an existing, resolvable OAS operation, as defined with a unique operationId.

public String

Returns:

an operation reference
operationRef
()

A relative or absolute reference to an OAS operation.

public LinkParameter[]

Returns:

the list of parameters for this link
parameters
()

Array of parameters to pass to an operation as specified with operationId or identified via operationRef.

public String

Returns:

reference to a link
ref
()

Reference value to a Link object.

public String

Returns:

the request body of this link
requestBody
()

A literal value or {expression} to use as a request body when calling the target operation.

public Server

Returns:

the server associated to this link
server
()

An alternative server to service this operation.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

descriptionback to summary
public String description()

A description of the link. CommonMark syntax may be used for rich text representation.

Returns:String

the link's description

extensionsback to summary
public Extension[] extensions()

List of extensions to be added to the Link model corresponding to the containing annotation.

Returns:Extension[]

array of extensions

Since
3.1
nameback to summary
public String name()

The name of this link.

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

Returns:String

the link's name

operationIdback to summary
public 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:String

an operation ID

operationRefback to summary
public 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:String

an operation reference

parametersback to summary
public LinkParameter[] parameters()

Array of parameters to pass to an operation as specified with operationId or identified via operationRef.

Returns:LinkParameter[]

the list of parameters for this link

refback to summary
public String ref()

Reference value to a Link object.

This property provides a reference to an object defined elsewhere. This property may be used with description() but is mutually exclusive with all other properties. If properties other than description are defined in addition to the ref property then the result is undefined.

Returns:String

reference to a link

requestBodyback to summary
public String requestBody()

A literal value or {expression} to use as a request body when calling the target operation.

Returns:String

the request body of this link

serverback to summary
public Server server()

An alternative server to service this operation.

Returns:Server

the server associated to this link