Top Description Methods
org.eclipse.microprofile.openapi.models

public Interface Operation

extends Constructible, Extensible<Operation>
Imports
java.util.List, .Map, org.eclipse.microprofile.openapi.models.callbacks.Callback, org.eclipse.microprofile.openapi.models.parameters.Parameter, .RequestBody, org.eclipse.microprofile.openapi.models.responses.APIResponses, org.eclipse.microprofile.openapi.models.security.SecurityRequirement, org.eclipse.microprofile.openapi.models.servers.Server

Operation

Describes a single API operation on a path.

See Also
OpenAPI Specification Operation Object

Method Summary

Modifier and TypeMethod and Description
public Operation

Returns:

the current Operation object
addCallback
(String
a key conforming to the format required for this object
key
,
Callback
a callback that is applicable for this operation. null values will be rejected (implementation will throw an exception) or ignored.
callback
)

Adds the given callback item to this Operation's map of callbacks.

public Operation

Returns:

the current Operation object
addParameter
(Parameter
a parameter that is applicable for this operation
parameter
)

Adds the given parameter item to this Operation's list of parameters.

public Operation

Returns:

the current Operation object
addSecurityRequirement
(SecurityRequirement
security mechanism which can be used for this operation
securityRequirement
)

Adds the given security requirement item to this Operation's list of security mechanisms.

public Operation

Returns:

the current Operation object
addServer
(Server
server which can service this operation
server
)

Adds the given server to this Operation's list of servers.

public Operation

Returns:

the current Operation object
addTag
(String
a tag for API documentation control
tag
)

Adds the given tag to this Operation's list of tags.

public default Operation

Returns:

the current Operation object
callbacks
(Map<String, Callback>
map of possible out-of-band callbacks related to the operation. The key value must be the correct format for this field.
callbacks
)

Sets this Operation's callbacks property to the given map.

public default Operation

Returns:

the current Operation object
deprecated
(Boolean
declaration whether this operation is deprecated
deprecated
)

Sets this Operation's deprecated property to the given value.

public default Operation

Returns:

the current Operation object
description
(String
a verbose explanation of the operation behavior
description
)

Sets this Operation's description property to the given string.

public default Operation

Returns:

the current Operation object
externalDocs
(ExternalDocumentation
additional external documentation for this operation
externalDocs
)

Sets this Operation's externalDocs property to the given object.

public Map<String, Callback>

Returns:

a copy Map (potentially immutable) of possible out-of-band callbacks related to the operation
getCallbacks
()

Returns the callbacks property from an Operation instance.

public Boolean

Returns:

declaration whether this operation is deprecated
getDeprecated
()

Returns the deprecated property from an Operation instance.

public String

Returns:

a verbose explanation of the operation behavior
getDescription
()

Returns the description property from an Operation instance.

public ExternalDocumentation

Returns:

additional external documentation for this operation
getExternalDocs
()

Returns the externalDocs property from an Operation instance.

public String

Returns:

unique string used to identify the operation
getOperationId
()

Returns the operationId property from an Operation instance.

public List<Parameter>

Returns:

a copy List (potentially immutable) of parameters that are applicable for this operation
getParameters
()

Returns the parameters property from an Operation instance.

public RequestBody

Returns:

the request body applicable for this operation
getRequestBody
()

Returns the requestBody property from an Operation instance.

public APIResponses

Returns:

collection of possible responses from executing this operation
getResponses
()

Returns the responses property from an Operation instance.

public List<SecurityRequirement>

Returns:

a copy List (potentially immutable) of which security mechanisms can be used for this operation
getSecurity
()

Returns the security property from an Operation instance.

public List<Server>

Returns:

a copy List (potentially immutable) of servers to service this operation
getServers
()

Returns the servers property from an Operation instance.

public String

Returns:

a short summary of what the operation does
getSummary
()

Returns the summary property from an Operation instance.

public List<String>

Returns:

a copy List (potentially immutable) of the operation's tags
getTags
()

Returns the tags property from an Operation instance.

public default Operation

Returns:

the current Operation object
operationId
(String
unique string used to identify the operation
operationId
)

Sets this Operation's operationId property to the given string.

public default Operation

Returns:

the current Operation object
parameters
(List<Parameter>
a list of parameters that are applicable for this operation
parameters
)

Sets this Operation's parameters property to the given parameter list.

public void
removeCallback(String
a key conforming to the format required for this object
key
)

Removes the given callback item to this Operation's map of callbacks.

public void
removeParameter(Parameter
a parameter that is applicable for this operation
parameter
)

Removes the given parameter item to this Operation's list of parameters.

public void
removeSecurityRequirement(SecurityRequirement
security mechanism which can be used for this operation
securityRequirement
)

Removes the given security requirement item to this Operation's list of security mechanisms.

public void
removeServer(Server
server which can service this operation
server
)

Removes the given server to this Operation's list of servers.

public void
removeTag(String
a tag for API documentation control
tag
)

Removes the given tag to this Operation's list of tags.

public default Operation

Returns:

the current Operation object
requestBody
(RequestBody
the request body applicable for this operation
requestBody
)

Sets this Operation's requestBody property to the given object.

public default Operation

Returns:

the current Operation object
responses
(APIResponses
collection of possible responses from executing this operation
responses
)

Sets this Operation's responses property to the given responses.

public default Operation

Returns:

the current Operation object
security
(List<SecurityRequirement>
list of which security mechanisms can be used for this operation
security
)

Sets this Operation's security property to the given list.

public default Operation

Returns:

the current Operation object
servers
(List<Server>
list of servers to service this operation
servers
)

Sets this Operation's servers property to the given list.

public void
setCallbacks(Map<String, Callback>
map of possible out-of-band callbacks related to the operation. The key value must be the correct format for this field.
callbacks
)

Sets this Operation's callbacks property to the given map.

public void
setDeprecated(Boolean
declaration whether this operation is deprecated
deprecated
)

Sets this Operation's deprecated property to the given value.

public void
setDescription(String
a verbose explanation of the operation behavior
description
)

Sets this Operation's description property to the given string.

public void
setExternalDocs(ExternalDocumentation
additional external documentation for this operation
externalDocs
)

Sets this Operation's externalDocs property to the given object.

public void
setOperationId(String
unique string used to identify the operation
operationId
)

Sets this Operation's operationId property to the given string.

public void
setParameters(List<Parameter>
a list of parameters that are applicable for this operation
parameters
)

Sets this Operation's parameters property to the given parameter list.

public void
setRequestBody(RequestBody
the request body applicable for this operation
requestBody
)

Sets this Operation's requestBody property to the given object.

public void
setResponses(APIResponses
collection of possible responses from executing this operation
responses
)

Sets this Operation's responses property to the given responses.

public void
setSecurity(List<SecurityRequirement>
list of which security mechanisms can be used for this operation
security
)

Sets this Operation's security property to the given list.

public void
setServers(List<Server>
list of servers to service this operation
servers
)

Sets this Operation's servers property to the given list.

public void
setSummary(String
a short summary of what the operation does
summary
)

Sets this Operation's summary property to the given string.

public void
setTags(List<String>
a list of tags for API documentation control
tags
)

Sets this Operation's tags property to the given tags.

public default Operation

Returns:

the current Operation object
summary
(String
a short summary of what the operation does
summary
)

Sets this Operation's summary property to the given string.

public default Operation

Returns:

the current Operation object
tags
(List<String>
a list of tags for API documentation control
tags
)

Sets this Operation's tags property to the given tags.

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions

Method Detail

addCallbackback to summary
public Operation addCallback(String key, Callback callback)

Adds the given callback item to this Operation's map of callbacks.

Parameters
key:String

a key conforming to the format required for this object

callback:Callback

a callback that is applicable for this operation. null values will be rejected (implementation will throw an exception) or ignored.

Returns:Operation

the current Operation object

addParameterback to summary
public Operation addParameter(Parameter parameter)

Adds the given parameter item to this Operation's list of parameters.

Parameters
parameter:Parameter

a parameter that is applicable for this operation

Returns:Operation

the current Operation object

addSecurityRequirementback to summary
public Operation addSecurityRequirement(SecurityRequirement securityRequirement)

Adds the given security requirement item to this Operation's list of security mechanisms.

Parameters
securityRequirement:SecurityRequirement

security mechanism which can be used for this operation

Returns:Operation

the current Operation object

addServerback to summary
public Operation addServer(Server server)

Adds the given server to this Operation's list of servers.

Parameters
server:Server

server which can service this operation

Returns:Operation

the current Operation object

addTagback to summary
public Operation addTag(String tag)

Adds the given tag to this Operation's list of tags.

Parameters
tag:String

a tag for API documentation control

Returns:Operation

the current Operation object

callbacksback to summary
public default Operation callbacks(Map<String, Callback> callbacks)

Sets this Operation's callbacks property to the given map.

Parameters
callbacks:Map<String, Callback>

map of possible out-of-band callbacks related to the operation. The key value must be the correct format for this field.

Returns:Operation

the current Operation object

deprecatedback to summary
public default Operation deprecated(Boolean deprecated)

Sets this Operation's deprecated property to the given value.

Parameters
deprecated:Boolean

declaration whether this operation is deprecated

Returns:Operation

the current Operation object

descriptionback to summary
public default Operation description(String description)

Sets this Operation's description property to the given string.

Parameters
description:String

a verbose explanation of the operation behavior

Returns:Operation

the current Operation object

externalDocsback to summary
public default Operation externalDocs(ExternalDocumentation externalDocs)

Sets this Operation's externalDocs property to the given object.

Parameters
externalDocs:ExternalDocumentation

additional external documentation for this operation

Returns:Operation

the current Operation object

getCallbacksback to summary
public Map<String, Callback> getCallbacks()

Returns the callbacks property from an Operation instance.

Returns:Map<String, Callback>

a copy Map (potentially immutable) of possible out-of-band callbacks related to the operation

getDeprecatedback to summary
public Boolean getDeprecated()

Returns the deprecated property from an Operation instance.

Returns:Boolean

declaration whether this operation is deprecated

getDescriptionback to summary
public String getDescription()

Returns the description property from an Operation instance.

Returns:String

a verbose explanation of the operation behavior

getExternalDocsback to summary
public ExternalDocumentation getExternalDocs()

Returns the externalDocs property from an Operation instance.

Returns:ExternalDocumentation

additional external documentation for this operation

getOperationIdback to summary
public String getOperationId()

Returns the operationId property from an Operation instance.

Returns:String

unique string used to identify the operation

getParametersback to summary
public List<Parameter> getParameters()

Returns the parameters property from an Operation instance.

Returns:List<Parameter>

a copy List (potentially immutable) of parameters that are applicable for this operation

getRequestBodyback to summary
public RequestBody getRequestBody()

Returns the requestBody property from an Operation instance.

Returns:RequestBody

the request body applicable for this operation

getResponsesback to summary
public APIResponses getResponses()

Returns the responses property from an Operation instance.

Returns:APIResponses

collection of possible responses from executing this operation

getSecurityback to summary
public List<SecurityRequirement> getSecurity()

Returns the security property from an Operation instance.

Returns:List<SecurityRequirement>

a copy List (potentially immutable) of which security mechanisms can be used for this operation

getServersback to summary
public List<Server> getServers()

Returns the servers property from an Operation instance.

Returns:List<Server>

a copy List (potentially immutable) of servers to service this operation

getSummaryback to summary
public String getSummary()

Returns the summary property from an Operation instance.

Returns:String

a short summary of what the operation does

getTagsback to summary
public List<String> getTags()

Returns the tags property from an Operation instance.

Returns:List<String>

a copy List (potentially immutable) of the operation's tags

operationIdback to summary
public default Operation operationId(String operationId)

Sets this Operation's operationId property to the given string.

Parameters
operationId:String

unique string used to identify the operation

Returns:Operation

the current Operation object

parametersback to summary
public default Operation parameters(List<Parameter> parameters)

Sets this Operation's parameters property to the given parameter list.

Parameters
parameters:List<Parameter>

a list of parameters that are applicable for this operation

Returns:Operation

the current Operation object

removeCallbackback to summary
public void removeCallback(String key)

Removes the given callback item to this Operation's map of callbacks.

Parameters
key:String

a key conforming to the format required for this object

removeParameterback to summary
public void removeParameter(Parameter parameter)

Removes the given parameter item to this Operation's list of parameters.

Parameters
parameter:Parameter

a parameter that is applicable for this operation

removeSecurityRequirementback to summary
public void removeSecurityRequirement(SecurityRequirement securityRequirement)

Removes the given security requirement item to this Operation's list of security mechanisms.

Parameters
securityRequirement:SecurityRequirement

security mechanism which can be used for this operation

removeServerback to summary
public void removeServer(Server server)

Removes the given server to this Operation's list of servers.

Parameters
server:Server

server which can service this operation

removeTagback to summary
public void removeTag(String tag)

Removes the given tag to this Operation's list of tags.

Parameters
tag:String

a tag for API documentation control

requestBodyback to summary
public default Operation requestBody(RequestBody requestBody)

Sets this Operation's requestBody property to the given object.

Parameters
requestBody:RequestBody

the request body applicable for this operation

Returns:Operation

the current Operation object

responsesback to summary
public default Operation responses(APIResponses responses)

Sets this Operation's responses property to the given responses.

Parameters
responses:APIResponses

collection of possible responses from executing this operation

Returns:Operation

the current Operation object

securityback to summary
public default Operation security(List<SecurityRequirement> security)

Sets this Operation's security property to the given list.

Parameters
security:List<SecurityRequirement>

list of which security mechanisms can be used for this operation

Returns:Operation

the current Operation object

serversback to summary
public default Operation servers(List<Server> servers)

Sets this Operation's servers property to the given list.

Parameters
servers:List<Server>

list of servers to service this operation

Returns:Operation

the current Operation object

setCallbacksback to summary
public void setCallbacks(Map<String, Callback> callbacks)

Sets this Operation's callbacks property to the given map.

Parameters
callbacks:Map<String, Callback>

map of possible out-of-band callbacks related to the operation. The key value must be the correct format for this field.

setDeprecatedback to summary
public void setDeprecated(Boolean deprecated)

Sets this Operation's deprecated property to the given value.

Parameters
deprecated:Boolean

declaration whether this operation is deprecated

setDescriptionback to summary
public void setDescription(String description)

Sets this Operation's description property to the given string.

Parameters
description:String

a verbose explanation of the operation behavior

setExternalDocsback to summary
public void setExternalDocs(ExternalDocumentation externalDocs)

Sets this Operation's externalDocs property to the given object.

Parameters
externalDocs:ExternalDocumentation

additional external documentation for this operation

setOperationIdback to summary
public void setOperationId(String operationId)

Sets this Operation's operationId property to the given string.

Parameters
operationId:String

unique string used to identify the operation

setParametersback to summary
public void setParameters(List<Parameter> parameters)

Sets this Operation's parameters property to the given parameter list.

Parameters
parameters:List<Parameter>

a list of parameters that are applicable for this operation

setRequestBodyback to summary
public void setRequestBody(RequestBody requestBody)

Sets this Operation's requestBody property to the given object.

Parameters
requestBody:RequestBody

the request body applicable for this operation

setResponsesback to summary
public void setResponses(APIResponses responses)

Sets this Operation's responses property to the given responses.

Parameters
responses:APIResponses

collection of possible responses from executing this operation

setSecurityback to summary
public void setSecurity(List<SecurityRequirement> security)

Sets this Operation's security property to the given list.

Parameters
security:List<SecurityRequirement>

list of which security mechanisms can be used for this operation

setServersback to summary
public void setServers(List<Server> servers)

Sets this Operation's servers property to the given list.

Parameters
servers:List<Server>

list of servers to service this operation

setSummaryback to summary
public void setSummary(String summary)

Sets this Operation's summary property to the given string.

Parameters
summary:String

a short summary of what the operation does

setTagsback to summary
public void setTags(List<String> tags)

Sets this Operation's tags property to the given tags.

Parameters
tags:List<String>

a list of tags for API documentation control

summaryback to summary
public default Operation summary(String summary)

Sets this Operation's summary property to the given string.

Parameters
summary:String

a short summary of what the operation does

Returns:Operation

the current Operation object

tagsback to summary
public default Operation tags(List<String> tags)

Sets this Operation's tags property to the given tags.

Parameters
tags:List<String>

a list of tags for API documentation control

Returns:Operation

the current Operation object