@Bean(properties="operationId,summary,description,tags,externalDocs,consumes,produces,parameters,responses,schemes,deprecated,security,*") public class Operation extends SwaggerElement
Constructor and Description |
---|
Operation() |
Modifier and Type | Method and Description |
---|---|
Operation |
addConsumes(Collection<MediaType> value)
Adds one or more values to the
|
Operation |
addParameters(Collection<ParameterInfo> value)
Adds one or more values to the
|
Operation |
addProduces(Collection<MediaType> value)
Adds one or more values to the
|
Operation |
addResponses(Map<String,ResponseInfo> values)
Adds one or more values to the
|
Operation |
addSchemes(Collection<String> value)
Adds one or more values to the
|
Operation |
addSecurity(Collection<Map<String,List<String>>> values)
Adds one or more values to the
|
Operation |
addTags(Collection<String> value)
Adds one or more values to the
|
Operation |
consumes(Object... values)
Adds one or more values to the
|
Operation |
deprecated(Object value)
Same as
setDeprecated(Boolean) . |
Operation |
description(Object value)
Same as
setDescription(String) . |
Operation |
externalDocs(Object value)
|
<T> T |
get(String property,
Class<T> type)
Generic property getter.
|
List<MediaType> |
getConsumes()
Bean property getter:
|
Boolean |
getDeprecated()
Bean property getter:
|
String |
getDescription()
Bean property getter:
|
ExternalDocumentation |
getExternalDocs()
Bean property getter:
|
String |
getOperationId()
Bean property getter:
|
List<ParameterInfo> |
getParameters()
Bean property getter:
|
List<MediaType> |
getProduces()
Bean property getter:
|
Map<String,ResponseInfo> |
getResponses()
Bean property getter:
|
List<String> |
getSchemes()
Bean property getter:
|
List<Map<String,List<String>>> |
getSecurity()
Bean property getter:
|
String |
getSummary()
Bean property getter:
|
List<String> |
getTags()
Bean property getter:
|
Operation |
operationId(Object value)
Same as
setOperationId(String) . |
Operation |
parameters(Object... values)
Same as
addParameters(Collection) . |
Operation |
produces(Object... values)
Same as
addProduces(Collection) . |
Operation |
response(String statusCode,
ResponseInfo response)
Adds a single value to the
|
Operation |
responses(Object... value)
Same as
addResponses(Map) . |
Operation |
schemes(Object... values)
Same as
addSchemes(Collection) . |
Operation |
securities(Object... value)
Same as
addSecurity(Collection) . |
Operation |
security(String scheme,
String... alternatives)
Same as
addSecurity(Collection) . |
Operation |
set(String property,
Object value)
Generic property setter.
|
Operation |
setConsumes(Collection<MediaType> value)
Bean property setter:
|
Operation |
setDeprecated(Boolean value)
Bean property setter:
|
Operation |
setDescription(String value)
Bean property setter:
|
Operation |
setExternalDocs(ExternalDocumentation value)
Bean property setter:
|
Operation |
setOperationId(String value)
Bean property setter:
|
Operation |
setParameters(Collection<ParameterInfo> value)
Bean property setter:
|
Operation |
setProduces(Collection<MediaType> value)
Bean property setter:
|
Operation |
setResponses(Map<String,ResponseInfo> value)
Bean property setter:
|
Operation |
setSchemes(Collection<String> value)
Bean property setter:
|
Operation |
setSecurity(Collection<Map<String,List<String>>> value)
Bean property setter:
|
Operation |
setSummary(String value)
Bean property setter:
|
Operation |
setTags(Collection<String> value)
Bean property setter:
|
Operation |
summary(Object value)
Same as
setSummary(String) . |
Operation |
tags(Object... values)
Same as
addTags(Collection) . |
getExtraProperties, isStrict, strict, strict, toString
public Operation()
public List<String> getTags()
A list of tags for API documentation control.
Tags can be used for logical grouping of operations by resources or any other qualifier.
public Operation setTags(Collection<String> value)
A list of tags for API documentation control.
Tags can be used for logical grouping of operations by resources or any other qualifier.
value
- The new value for this property.
public Operation addTags(Collection<String> value)
A list of tags for API documentation control.
Tags can be used for logical grouping of operations by resources or any other qualifier.
value
- The values to add to this property.
public Operation tags(Object... values)
addTags(Collection)
.values
- The values to add to this property.
Collection<String>
String
- JSON array representation of Collection<String>
tags(
String
- Individual values
tags(
public String getSummary()
A short summary of what the operation does.
public Operation setSummary(String value)
A short summary of what the operation does.
value
- The new value for this property.
public Operation summary(Object value)
setSummary(String)
.value
- The new value for this property.
toString()
.
public String getDescription()
A verbose explanation of the operation behavior.
public Operation setDescription(String value)
A verbose explanation of the operation behavior.
value
- The new value for this property.
public Operation description(Object value)
setDescription(String)
.value
- The new value for this property.
toString()
.
public ExternalDocumentation getExternalDocs()
Additional external documentation for this operation.
public Operation setExternalDocs(ExternalDocumentation value)
Additional external documentation for this operation.
value
- The values to add to this property.
public Operation externalDocs(Object value)
value
- The new value for this property.
ExternalDocumentation
String
- JSON object representation of ExternalDocumentation
externalDocs(
public String getOperationId()
Unique string used to identify the operation.
public Operation setOperationId(String value)
Unique string used to identify the operation.
value
- The new value for this property.
public Operation operationId(Object value)
setOperationId(String)
.value
- The new value for this property.
toString()
.
public List<MediaType> getConsumes()
A list of MIME types the operation can consume.
This overrides the consumes
definition at the Swagger Object.
An empty value MAY be used to clear the global definition.
public Operation setConsumes(Collection<MediaType> value)
A list of MIME types the operation can consume.
This overrides the consumes
definition at the Swagger Object.
An empty value MAY be used to clear the global definition.
value
- The new value for this property.
public Operation addConsumes(Collection<MediaType> value)
A list of MIME types the operation can consume.
This overrides the consumes
definition at the Swagger Object.
An empty value MAY be used to clear the global definition.
value
- The values to add to this property.
public Operation consumes(Object... values)
values
- The values to add to this property.
MediaType
Collection<MediaType
|String>
MediaType
[]
String
- JSON array representation of Collection<MediaType
>
consumes(
String
- Individual values
consumes(
public List<MediaType> getProduces()
A list of MIME types the operation can produce.
This overrides the produces
definition at the Swagger Object.
An empty value MAY be used to clear the global definition.
public Operation setProduces(Collection<MediaType> value)
A list of MIME types the operation can produce.
This overrides the produces
definition at the Swagger Object.
An empty value MAY be used to clear the global definition.
value
- The values to add to this property.
public Operation addProduces(Collection<MediaType> value)
A list of MIME types the operation can produces.
This overrides the produces
definition at the Swagger Object.
An empty value MAY be used to clear the global definition.
value
- The values to add to this property.
public Operation produces(Object... values)
addProduces(Collection)
.values
- The values to add to this property.
MediaType
Collection<MediaType
|String>
MediaType
[]
String
- JSON array representation of Collection<MediaType
>
produces(
String
- Individual values
produces(
public List<ParameterInfo> getParameters()
A list of parameters that are applicable for this operation.
name
and location
.
public Operation setParameters(Collection<ParameterInfo> value)
A list of parameters that are applicable for this operation.
name
and location
.
value
- The new value for this property.
public Operation addParameters(Collection<ParameterInfo> value)
A list of parameters that are applicable for this operation.
name
and location
.
value
- The values to add to this property.
public Operation parameters(Object... values)
addParameters(Collection)
.values
- The values to add to this property.
ParameterInfo
Collection<ParameterInfo
|String>
String
- JSON array representation of Collection<ParameterInfo
>
parameters(
String
- JSON object representation of ParameterInfo
parameters(
public Map<String,ResponseInfo> getResponses()
The list of possible responses as they are returned from executing this operation.
public Operation setResponses(Map<String,ResponseInfo> value)
The list of possible responses as they are returned from executing this operation.
value
- The new value for this property.
public Operation addResponses(Map<String,ResponseInfo> values)
The list of possible responses as they are returned from executing this operation.
values
- The values to add to this property.
public Operation response(String statusCode, ResponseInfo response)
statusCode
- The HTTP status code.response
- The response description.public Operation responses(Object... value)
addResponses(Map)
.value
- The new value for this property.
Map<Integer,ResponseInfo
|String>
String
- JSON object representation of Map<Integer,ResponseInfo
>
responses(
public List<String> getSchemes()
The transfer protocol for the operation.
The value overrides the Swagger Object schemes
definition.
public Operation setSchemes(Collection<String> value)
The transfer protocol for the operation.
The value overrides the Swagger Object schemes
definition.
value
- The new value for this property.
public Operation addSchemes(Collection<String> value)
The transfer protocol for the operation.
The value overrides the Swagger Object schemes
definition.
value
- The values to add to this property.
public Operation schemes(Object... values)
addSchemes(Collection)
.values
- The new value for this property.
Collection<String>
String
- JSON array representation of Collection<String>
schemes(
String
- Individual values
schemes(
public Boolean getDeprecated()
Declares this operation to be deprecated.
public Operation setDeprecated(Boolean value)
Declares this operation to be deprecated.
value
- T
The new value for this property.public Operation deprecated(Object value)
setDeprecated(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public List<Map<String,List<String>>> getSecurity()
A declaration of which security schemes are applied for this operation.
The list of values describes alternative security schemes that can be used (that is, there is a logical OR
between the security requirements).
This definition overrides any declared top-level security.
To remove a top-level security
declaration, an empty array can be used.
public Operation setSecurity(Collection<Map<String,List<String>>> value)
A declaration of which security schemes are applied for this operation.
The list of values describes alternative security schemes that can be used (that is, there is a logical OR
between the security requirements).
This definition overrides any declared top-level security.
To remove a top-level security
declaration, an empty array can be used.
value
- The new value for this property.
public Operation addSecurity(Collection<Map<String,List<String>>> values)
A declaration of which security schemes are applied for this operation.
The list of values describes alternative security schemes that can be used (that is, there is a logical OR
between the security requirements).
This definition overrides any declared top-level security.
To remove a top-level security
declaration, an empty array can be used.
values
- The values to add to this property.
public Operation security(String scheme, String... alternatives)
addSecurity(Collection)
.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).public Operation securities(Object... value)
addSecurity(Collection)
.value
- The new value for this property.
Map<String,List<String>>
String
- JSON object representation of a Map<String,List<String>>
securities(
public <T> T get(String property, Class<T> type)
SwaggerElement
Can be used to retrieve non-standard Swagger fields such as
get
in class SwaggerElement
property
- The property name to retrieve.type
- The datatype to cast the value to.public Operation set(String property, Object value)
SwaggerElement
Can be used to set non-standard Swagger fields such as
set
in class SwaggerElement
property
- The property name to set.value
- The new value for the property.Copyright © 2018 Apache. All rights reserved.