#[non_exhaustive]pub struct PathItem {
pub summary: Option<String>,
pub description: Option<String>,
pub servers: Servers,
pub parameters: Parameters,
pub operations: Operations,
}Expand description
Implements OpenAPI Path Item Object what describes Operations available on
a single path.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.summary: Option<String>Optional summary intended to apply all operations in this PathItem.
description: Option<String>Optional description intended to apply all operations in this PathItem.
Description supports markdown syntax.
servers: ServersAlternative Server array to serve all Operations in this PathItem overriding
the global server array.
parameters: ParametersList of Parameters common to all Operations in this PathItem. Parameters cannot
contain duplicate parameters. They can be overridden in Operation level but cannot be
removed there.
operations: OperationsMap of operations in this PathItem. Operations can hold only one operation
per PathItemType.
Implementations§
Source§impl PathItem
impl PathItem
Sourcepub fn new<O: Into<Operation>>(
path_item_type: PathItemType,
operation: O,
) -> Self
pub fn new<O: Into<Operation>>( path_item_type: PathItemType, operation: O, ) -> Self
Construct a new PathItem with provided Operation mapped to given PathItemType.
Sourcepub fn append(&mut self, other: &mut Self)
pub fn append(&mut self, other: &mut Self)
Moves all elements from other into self, leaving other empty.
If a key from other is already present in self, the respective
value from self will be overwritten with the respective value from other.
Sourcepub fn add_operation<O: Into<Operation>>(
self,
path_item_type: PathItemType,
operation: O,
) -> Self
pub fn add_operation<O: Into<Operation>>( self, path_item_type: PathItemType, operation: O, ) -> Self
Append a new Operation by PathItemType to this PathItem. Operations can
hold only one operation per PathItemType.
Sourcepub fn summary<S: Into<String>>(self, summary: S) -> Self
pub fn summary<S: Into<String>>(self, summary: S) -> Self
Add or change summary intended to apply all operations in this PathItem.
Sourcepub fn description<S: Into<String>>(self, description: S) -> Self
pub fn description<S: Into<String>>(self, description: S) -> Self
Add or change optional description intended to apply all operations in this PathItem.
Description supports markdown syntax.