pub struct Operation {
pub id: String,
pub method: HttpMethod,
pub path: String,
pub parameters: Vec<OperationParameter>,
pub request_body: Option<OperationRequestBody>,
pub responses: Vec<OperationResponse>,
pub security: Vec<SecurityRequirement>,
pub annotations: BTreeMap<String, Value>,
}Fields§
§id: String§method: HttpMethod§path: String§parameters: Vec<OperationParameter>§request_body: Option<OperationRequestBody>§responses: Vec<OperationResponse>§security: Vec<SecurityRequirement>OpenAPI security requirements, preserving its OR-of-AND structure. Each entry is an alternative; every named scheme inside an entry is required together. Values are OAuth/OpenID scopes where applicable.
annotations: BTreeMap<String, Value>Implementations§
Source§impl Operation
impl Operation
Sourcepub fn request_schema(&self) -> Option<&SchemaValue>
pub fn request_schema(&self) -> Option<&SchemaValue>
The preferred request schema, favoring JSON when multiple media types exist.
Sourcepub fn success_schema(&self) -> Option<&SchemaValue>
pub fn success_schema(&self) -> Option<&SchemaValue>
The first declared successful response’s schema, favoring JSON media. Error and default responses are not treated as successful responses.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Operation
impl<'de> Deserialize<'de> for Operation
Source§fn 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 Eq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more