An operation object describes a single API operation within a path, including all its possible inputs and outputs and the configuration required to make a successful request.
Each operation object corresponds to an HTTP verb, such as get, post, or delete.
Example:
Operation Object Fields
Field
Type
String
Required
Description
A unique identifier for the operation, this must be unique within the document, and is case sensitive. It is recommended to always define an
, but is not required.
Type
Boolean
Required
Description
Whether the operation is deprecated or not. Defaults to
.
Type
String
Required
Description
A short summary of what the operation does. This may contain CommonMark syntax to provide a rich description.
Type
String
Required
Description
A detailed description of the operation, what it does, and how to use it. This may contain CommonMark syntax to provide a rich description.
A list of Parameter Objects that are available to this operation. The parameters defined here merge with any defined at the path level, overriding any duplicates.
A list of Parameter Objects that are available to this operation. The parameters defined here merge with any defined at the path level, overriding any duplicates.
A map of Callback Objects that define possible callbacks that may be executed as a result of this operation.
The above order of fields is recommended for defining the fields in the document to help set the stage for the operation and provide a clear understanding of what it does.