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

public @Interface PathItemOperation

extends Annotation
Annotations
@Target
@Retention:RUNTIME
Imports
java.lang.annotation.Retention, .RetentionPolicy, .Target, org.eclipse.microprofile.openapi.annotations.callbacks.Callback, org.eclipse.microprofile.openapi.annotations.extensions.Extension, org.eclipse.microprofile.openapi.annotations.parameters.Parameter, .RequestBody, org.eclipse.microprofile.openapi.annotations.responses.APIResponse, org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement, .SecurityRequirementsSet, org.eclipse.microprofile.openapi.annotations.servers.Server, org.eclipse.microprofile.openapi.annotations.tags.Tag

Describes an Operation

This annotation is only used for operations defined under a PathItem. For operations provided by the API itself, it's more common to use the Operation annotation applied to a Jakarta REST resource method instead.

Since
4.0

Method Summary

Modifier and TypeMethod and Description
public Callback[]

Returns:

the list of callbacks for this operation
callbacks
()

A list of possible out-of-band callbacks related to this operation.

public boolean

Returns:

whether or not this operation is deprecated
deprecated
()

Allows an operation to be marked as deprecated

Consumers SHOULD refrain from usage of a deprecated operation.

public String

Returns:

a description of this operation
description
()

A verbose description of the operation behavior.

public Extension[]

Returns:

array of extensions
extensions
()

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

public ExternalDocumentation

Returns:

external documentation associated with this operation instance
externalDocs
()

Additional external documentation for this operation.

public String

Returns:

the HTTP method of this operation
method
()

The HTTP method for this operation.

public String

Returns:

the ID of this operation
operationId
()

Unique string used to identify the operation.

public Parameter[]

Returns:

the list of parameters for this operation
parameters
()

An array of parameters applicable for this operation.

public RequestBody

Returns:

the request body of this operation
requestBody
()

The request body for this operation.

public APIResponse[]

Returns:

the list of responses for this operation
responses
()

The list of possible responses that can be returned when executing this operation.

public SecurityRequirement[]

Returns:

the list of security mechanisms for this operation
security
()

A declaration of which security mechanisms can be used for this callback operation.

public SecurityRequirementsSet[]

Returns:

the list of security mechanisms for this operation
securitySets
()

A declaration of which security mechanisms can be used for this callback operation.

public Server[]

Returns:

the list of servers
servers
()

A list of servers to be used for this operation, overriding those defined for the parent path item or for the whole API.

public String

Returns:

a summary of this operation
summary
()

Provides a brief description of what this operation does.

public Tag[]

Returns:

the list of tags
tags
()

The tags which apply to this operation.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

callbacksback to summary
public Callback[] callbacks()

A list of possible out-of-band callbacks related to this operation. Each entry represents a set of requests that may be initiated by the API provided and an expression, evaluated at runtime, that identifies the URL used to make those requests.

Returns:Callback[]

the list of callbacks for this operation

deprecatedback to summary
public boolean deprecated()

Allows an operation to be marked as deprecated

Consumers SHOULD refrain from usage of a deprecated operation.

Returns:boolean

whether or not this operation is deprecated

descriptionback to summary
public String description()

A verbose description of the operation behavior. CommonMark syntax MAY be used for rich text representation.

Returns:String

a description of this operation

extensionsback to summary
public Extension[] extensions()

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

Returns:Extension[]

array of extensions

externalDocsback to summary
public ExternalDocumentation externalDocs()

Additional external documentation for this operation.

Returns:ExternalDocumentation

external documentation associated with this operation instance

methodback to summary
public String method()

The HTTP method for this operation.

Returns:String

the HTTP method of this operation

operationIdback to summary
public String operationId()

Unique string used to identify the operation. 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.

Returns:String

the ID of this operation

parametersback to summary
public Parameter[] parameters()

An array of parameters applicable for this operation.

The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.

Returns:Parameter[]

the list of parameters for this operation

requestBodyback to summary
public RequestBody requestBody()

The request body for this operation.

Returns:RequestBody

the request body of this operation

responsesback to summary
public APIResponse[] responses()

The list of possible responses that can be returned when executing this operation.

Returns:APIResponse[]

the list of responses for this operation

securityback to summary
public SecurityRequirement[] security()

A declaration of which security mechanisms can be used for this callback operation. Only one of the security requirement objects need to be satisfied to authorize a request.

Adding a SecurityRequirement to this array is equivalent to adding a SecurityRequirementsSet containing a single SecurityRequirement to securitySets().

This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.

Returns:SecurityRequirement[]

the list of security mechanisms for this operation

securitySetsback to summary
public SecurityRequirementsSet[] securitySets()

A declaration of which security mechanisms can be used for this callback operation. All of the security requirements within any one of the sets needs needs to be satisfied to authorize a request.

This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used.

Including an empty set within this list indicates that the other requirements are optional.

Returns:SecurityRequirementsSet[]

the list of security mechanisms for this operation

serversback to summary
public Server[] servers()

A list of servers to be used for this operation, overriding those defined for the parent path item or for the whole API.

Returns:Server[]

the list of servers

summaryback to summary
public String summary()

Provides a brief description of what this operation does.

Returns:String

a summary of this operation

tagsback to summary
public Tag[] tags()

The tags which apply to this operation.

Returns:Tag[]

the list of tags