pub struct Operation {
pub tags: Vec<String>,
pub summary: Option<String>,
pub description: Option<String>,
pub external_documentation: Option<ExternalDocumentation>,
pub operation_id: Option<String>,
pub parameters: Vec<ReferenceOr<Parameter>>,
pub request_body: Option<ReferenceOr<RequestBody>>,
pub responses: Responses,
pub deprecated: bool,
pub security: Vec<SecurityRequirement>,
pub servers: Vec<Server>,
pub extensions: IndexMap<String, Value>,
}
Expand description
Describes a single API operation on a path.
Fields
A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
summary: Option<String>
A short summary of what the operation does.
description: Option<String>
A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
external_documentation: Option<ExternalDocumentation>
Additional external documentation for this operation.
operation_id: Option<String>
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.
parameters: Vec<ReferenceOr<Parameter>>
A list of parameters that are applicable for this operation. 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 and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.
request_body: Option<ReferenceOr<RequestBody>>
The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification RFC7231 has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.
responses: Responses
REQUIRED. The list of possible responses as they are returned from executing this operation.
deprecated: bool
Declares this operation to be deprecated.Default value is false.
security: Vec<SecurityRequirement>
A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need 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.
servers: Vec<Server>
An alternative server array to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.
extensions: IndexMap<String, Value>
Inline extensions to this object.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Operation
Auto Trait Implementations
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more