Class Operation
Example:
See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddConsumes
(MediaType... value) Bean property fluent setter:consumes .addParameters
(ParameterInfo... value) Bean property fluent setter:parameters .addProduces
(MediaType... value) Bean property fluent setter:produces .addResponse
(String statusCode, ResponseInfo response) Adds a single value to theresponses property.addSchemes
(String... value) Bean property fluent setter:schemes .addSecurity
(String scheme, String... alternatives) Same asaddSecurity(String, String...)
.Bean property fluent adder:tags .copy()
Make a deep copy of this object.<T> T
Generic property getter.Bean property getter:consumes .Bean property getter:deprecated .Bean property getter:description .Bean property getter:externalDocs .Bean property getter:operationId .getParameter
(String in, String name) Returns the parameter with the specified type and name.Bean property getter:parameters .Bean property getter:produces .getResponse
(int status) Returns the response info with the given status code.getResponse
(String status) Returns the response info with the given status code.Bean property getter:responses .Bean property getter:schemes .Bean property getter:security .Bean property getter:summary .getTags()
Bean property getter:tags .boolean
Bean property getter:deprecated .keySet()
Returns all the keys on this element.Generic property setter.setConsumes
(Collection<MediaType> value) Bean property setter:consumes .setConsumes
(MediaType... value) Bean property setter:consumes .setDeprecated
(Boolean value) Bean property setter:deprecated .setDescription
(String value) Bean property setter:description .Bean property setter:externalDocs .setOperationId
(String value) Bean property setter:operationId .setParameters
(Collection<ParameterInfo> value) Bean property setter:parameters .setParameters
(ParameterInfo... value) Bean property setter:parameters .setProduces
(Collection<MediaType> value) Bean property setter:produces .setProduces
(MediaType... value) Bean property setter:produces .setResponses
(Map<String, ResponseInfo> value) Bean property setter:responses .setSchemes
(Collection<String> value) Bean property setter:schemes .setSecurity
(Collection<Map<String, List<String>>> value) Bean property setter:security .setSummary
(String value) Bean property setter:summary .Bean property fluent setter:tags .setTags
(Collection<String> value) Bean property setter:tags .
-
Constructor Details
-
Operation
public Operation()Default constructor. -
Operation
Copy constructor.- Parameters:
copyFrom
- The object to copy.
-
-
Method Details
-
copy
Make a deep copy of this object.- Returns:
- A deep copy of this object.
-
getConsumes
Bean property getter:consumes .A list of MIME types the operation can consume.
- Returns:
- The property value, or
null if it is not set.
-
setConsumes
Bean property setter:consumes .A list of MIME types the operation can consume.
- Parameters:
value
- The new value for this property.
Values MUST be as described under Swagger Mime Types.
Can benull to unset the property.- Returns:
- This object.
-
setConsumes
Bean property setter:consumes .A list of MIME types the operation can consume.
- Parameters:
value
- The new value for this property.
Values MUST be as described under Swagger Mime Types.- Returns:
- This object.
-
addConsumes
Bean property fluent setter:consumes .A list of MIME types the operation can consume.
- Parameters:
value
- The new value for this property.- Returns:
- This object.
-
getDeprecated
Bean property getter:deprecated .Declares this operation to be deprecated.
- Returns:
- The property value, or
null if it is not set.
-
isDeprecated
Bean property getter:deprecated .Declares this operation to be deprecated.
- Returns:
- The property value, or
false if it is not set.
-
setDeprecated
Bean property setter:deprecated .Declares this operation to be deprecated.
- Parameters:
value
- The new value for this property.- Returns:
- This object.
-
getDescription
Bean property getter:description .A verbose explanation of the operation behavior.
- Returns:
- The property value, or
null if it is not set.
-
setDescription
Bean property setter:description .A verbose explanation of the operation behavior.
- Parameters:
value
- The new value for this property.
GFM syntax can be used for rich text representation.
Can benull to unset the property.- Returns:
- This object.
-
getExternalDocs
Bean property getter:externalDocs .Additional external documentation for this operation.
- Returns:
- The property value, or
null if it is not set.
-
setExternalDocs
Bean property setter:externalDocs .Additional external documentation for this operation.
- Parameters:
value
- The values to add to this property.
Can benull to unset the property.- Returns:
- This object.
-
getOperationId
Bean property getter:operationId .Unique string used to identify the operation.
- Returns:
- The property value, or
null if it is not set.
-
setOperationId
Bean property setter:operationId .Unique string used to identify the operation.
- Parameters:
value
- The new value for this property.
The id MUST be unique among all operations described in the API.
Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.
Can benull to unset the property.- Returns:
- This object.
-
getParameters
Bean property getter:parameters .A list of parameters that are applicable for this operation.
Notes:
- If a parameter is already defined at the Path Item, the new definition will override it, but can never remove it.
- The list MUST NOT include duplicated parameters.
-
A unique parameter is defined by a combination of a
name andlocation . - The list can use the Swagger Reference Object to link to parameters that are defined at the Swagger Object's parameters.
-
There can be one
"body" parameter at most.
- Returns:
- The property value, or
null if it is not set.
-
getParameter
Returns the parameter with the specified type and name.- Parameters:
in
- The parameter in.name
- The parameter name. Can benull for parameter typebody .- Returns:
- The matching parameter info, or
null if not found.
-
setParameters
Bean property setter:parameters .A list of parameters that are applicable for this operation.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
setParameters
Bean property setter:parameters .A list of parameters that are applicable for this operation.
- Parameters:
value
- The new value for this property.- Returns:
- This object.
-
addParameters
Bean property fluent setter:parameters .A list of parameters that are applicable for this operation.
- Parameters:
value
- The new value for this property.- Returns:
- This object.
-
getProduces
Bean property getter:produces .A list of MIME types the operation can produce.
- Returns:
- The property value, or
null if it is not set.
-
setProduces
Bean property setter:produces .A list of MIME types the operation can produce.
- Parameters:
value
- The new value for this property.
Value MUST be as described under Swagger Mime Types.
Can benull to unset the property.- Returns:
- This object.
-
setProduces
Bean property setter:produces .A list of MIME types the operation can produce.
- Parameters:
value
- The new value for this property.
Value MUST be as described under Swagger Mime Types.- Returns:
- This object.
-
addProduces
Bean property fluent setter:produces .A list of MIME types the operation can produce.
- Parameters:
value
- The new value for this property.- Returns:
- This object.
-
getResponses
Bean property getter:responses .The list of possible responses as they are returned from executing this operation.
- Returns:
- The property value, or
null if it is not set.
-
getResponse
Returns the response info with the given status code.- Parameters:
status
- The HTTP status code.- Returns:
- The response info, or
null if not found.
-
getResponse
Returns the response info with the given status code.- Parameters:
status
- The HTTP status code.- Returns:
- The response info, or
null if not found.
-
setResponses
Bean property setter:responses .The list of possible responses as they are returned from executing this operation.
- Parameters:
value
- The new value for this property.
Property value is required.- Returns:
- This object.
-
addResponse
Adds a single value to theresponses property.- Parameters:
statusCode
- The HTTP status code.response
- The response description.- Returns:
- This object.
-
getSchemes
Bean property getter:schemes .The transfer protocol for the operation.
- Returns:
- The property value, or
null if it is not set.
-
setSchemes
Bean property setter:schemes .The transfer protocol for the operation.
- Parameters:
value
- The new value for this property.
Valid values:"http" "https" "ws" "wss"
Can benull to unset the property.- Returns:
- This object.
-
addSchemes
Bean property fluent setter:schemes .The transfer protocol for the operation.
- Parameters:
value
- The new value for this property.
String values can also be JSON arrays.- Returns:
- This object.
-
getSecurity
Bean property getter:security .A declaration of which security schemes are applied for this operation.
- Returns:
- The property value, or
null if it is not set.
-
setSecurity
Bean property setter:security .A declaration of which security schemes are applied for this operation.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
addSecurity
Same asaddSecurity(String, String...)
.- Parameters:
scheme
- The scheme name.alternatives
- The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements).- Returns:
- This object.
-
getSummary
Bean property getter:summary .A short summary of what the operation does.
- Returns:
- The property value, or
null if it is not set.
-
setSummary
Bean property setter:summary .A short summary of what the operation does.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
getTags
Bean property getter:tags .A list of tags for API documentation control.
Tags can be used for logical grouping of operations by resources or any other qualifier.- Returns:
- The property value, or
null if it is not set.
-
setTags
Bean property setter:tags .A list of tags for API documentation control.
Tags can be used for logical grouping of operations by resources or any other qualifier.- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object.
-
setTags
Bean property fluent setter:tags .A list of tags for API documentation control.
Tags can be used for logical grouping of operations by resources or any other qualifier.- Parameters:
value
- The new value for this property.- Returns:
- This object.
-
addTags
Bean property fluent adder:tags .A list of tags for API documentation control.
Tags can be used for logical grouping of operations by resources or any other qualifier.- Parameters:
value
- The values to add to this property.- Returns:
- This object.
-
get
Description copied from class:SwaggerElement
Generic property getter.Can be used to retrieve non-standard Swagger fields such as
"$ref" .- Overrides:
get
in classSwaggerElement
- 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.
-
set
Description copied from class:SwaggerElement
Generic property setter.Can be used to set non-standard Swagger fields such as
"$ref" .- Overrides:
set
in classSwaggerElement
- Parameters:
property
- The property name to set.value
- The new value for the property.- Returns:
- This object.
-
keySet
Description copied from class:SwaggerElement
Returns all the keys on this element.- Overrides:
keySet
in classSwaggerElement
- Returns:
- All the keys on this element.
Nevernull .
-