Class 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.
OpenAPI Specification:
The Link Object is composed of the following fields:
operationRef (string) - A relative or absolute reference to an OAS operation (mutually exclusive withoperationId )operationId (string) - The name of an existing, resolvable OAS operation (mutually exclusive withoperationRef )parameters (map of any) - A map representing parameters to pass to an operation as specified withoperationId or identified viaoperationRef requestBody (any) - A literal value or expression to use as a request body when calling the target operationdescription (string) - A description of the link (CommonMark syntax may be used)server (Server) - A server object to be used by the target operation
Example:
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddParameter(String mimeType, Object parameter) Adds a single value to theparameters property.copy()Make a deep copy of this object.<T> TGeneric property getter.Bean property getter:description .Bean property getter:operationId .Bean property getter:operationRef .Bean property getter:parameters .Bean property getter:requestBody .Bean property getter:server .keySet()Returns all the keys on this element.Generic property setter.setDescription(String value) Bean property setter:description .setOperationId(String value) Bean property setter:operationId .setOperationRef(String value) Bean property setter:operationRef .setParameters(Map<String, Object> value) Bean property setter:parameters .setRequestBody(Object val) Bean property setter:requestBody .Bean property setter:server .strict()Sets strict mode on this bean.Sets strict mode on this bean.
-
Constructor Details
-
Link
public Link()Default constructor. -
Link
Copy constructor.- Parameters:
copyFrom- The object to copy.
-
-
Method Details
-
addParameter
Adds a single value to theparameters property.- Parameters:
mimeType- The parameter name. Must not benull , or anIllegalArgumentExceptionis thrown.parameter- The parameter value. Must not benull , or anIllegalArgumentExceptionis thrown.- Returns:
- This object
-
copy
Make a deep copy of this object.- Returns:
- A deep copy of this object.
-
get
Description copied from class:OpenApiElementGeneric property getter.Can be used to retrieve non-standard Swagger fields such as
"$ref" .- Overrides:
getin classOpenApiElement- Type Parameters:
T- The datatype to cast the value to.- Parameters:
property- The property name to retrieve.type- The datatype to cast the value to.- Returns:
- The property value, or
null if the property does not exist or is not set.
-
getDescription
Bean property getter:description .A description of the link.
- Returns:
- The property value, or
null if it is not set.
-
getOperationId
Bean property getter:operationId .The name of an existing, resolvable OAS operation.
- Returns:
- The property value, or
null if it is not set.
-
getOperationRef
Bean property getter:operationRef .A relative or absolute reference to an OAS operation.
- Returns:
- The property value, or
null if it is not set.
-
getParameters
Bean property getter:parameters .A map representing parameters to pass to an operation.
- Returns:
- The property value, or
null if it is not set.
-
getRequestBody
Bean property getter:requestBody .A literal value or expression to use as a request body when calling the target operation.
- Returns:
- The property value, or
null if it is not set.
-
getServer
Bean property getter:server .- Returns:
- The property value, or
null if it is not set.
-
keySet
Description copied from class:OpenApiElementReturns all the keys on this element.- Overrides:
keySetin classOpenApiElement- Returns:
- All the keys on this element.
Nevernull .
-
set
Description copied from class:OpenApiElementGeneric property setter.Can be used to set non-standard Swagger fields such as
"$ref" .- Overrides:
setin classOpenApiElement- Parameters:
property- The property name to set. Must not benull , or anIllegalArgumentExceptionis thrown.value- The new value for the property.- Returns:
- This object
-
setDescription
Bean property setter:description .- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setOperationId
Bean property setter:operationId .The name of an existing, resolvable OAS operation.
- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setOperationRef
Bean property setter:operationRef .A relative or absolute reference to an OAS operation.
- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setParameters
Bean property setter:parameters .A map representing parameters to pass to an operation.
- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setRequestBody
Bean property setter:requestBody .A literal value or expression to use as a request body when calling the target operation.
- Parameters:
val- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setServer
Bean property setter:server .- Parameters:
value- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
strict
Description copied from class:OpenApiElementSets strict mode on this bean.- Overrides:
strictin classOpenApiElement- Returns:
- This object
-
strict
Description copied from class:OpenApiElementSets strict mode on this bean.- Overrides:
strictin classOpenApiElement- Parameters:
value- The new value for this property.
Non-boolean values will be converted to boolean usingBoolean..valueOf (value.toString())
Can benull (interpreted asfalse ).- Returns:
- This object
-