[−]Struct rweb::openapi::Operation
Describes a single API operation on a path.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#operationObject.
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: Cow<'static, str>
A short summary of what the operation does.
description: Cow<'static, str>
A verbose explanation of the operation behavior. CommonMark syntax MAY be used for rich text representation.
external_docs: Option<ExternalDoc>
Additional external documentation for this operation.
operation_id: Cow<'static, str>
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<ObjectOrReference<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<ObjectOrReference<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: BTreeMap<Cow<'static, str>, Response>
The list of possible responses as they are returned from executing this operation.
A container for the expected responses of an operation. The container maps a HTTP response code to the expected response.
The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.
The default
MAY be used as a default response object for all HTTP codes that are not
covered individually by the specification.
The Responses Object
MUST contain at least one response code, and it SHOULD be the
response for a successful operation call.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#responsesObject.
callbacks: BTreeMap<Cow<'static, str>, Callback>
A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.
deprecated: Option<bool>
Declares this operation to be deprecated. Consumers SHOULD refrain from usage
of the declared operation. Default value is false
.
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.
Trait Implementations
impl Clone for Operation
fn clone(&self) -> Operation
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Operation
impl Default for Operation
impl<'de> Deserialize<'de> for Operation
fn deserialize<__D>(
__deserializer: __D
) -> Result<Operation, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
__deserializer: __D
) -> Result<Operation, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl PartialEq<Operation> for Operation
impl Serialize for Operation
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,