#[non_exhaustive]pub struct PathItem {Show 13 fields
pub summary: Option<String>,
pub description: Option<String>,
pub servers: Option<Vec<Server>>,
pub parameters: Option<Vec<Parameter>>,
pub get: Option<Operation>,
pub put: Option<Operation>,
pub post: Option<Operation>,
pub delete: Option<Operation>,
pub options: Option<Operation>,
pub head: Option<Operation>,
pub patch: Option<Operation>,
pub trace: Option<Operation>,
pub extensions: Option<Extensions>,
}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: Option<Vec<Server>>Alternative Server array to serve all Operations in this PathItem overriding
the global server array.
parameters: Option<Vec<Parameter>>List 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.
get: Option<Operation>§put: Option<Operation>§post: Option<Operation>§delete: Option<Operation>§options: Option<Operation>§head: Option<Operation>§patch: Option<Operation>§trace: Option<Operation>§extensions: Option<Extensions>Optional extensions “x-something”.
Implementations§
Source§impl PathItem
impl PathItem
Sourcepub fn builder() -> PathItemBuilder
pub fn builder() -> PathItemBuilder
Create an instance of PathItem using the builder syntax
Source§impl PathItem
impl PathItem
Sourcepub fn new<O: Into<Operation>>(http_method: HttpMethod, operation: O) -> Self
pub fn new<O: Into<Operation>>(http_method: HttpMethod, operation: O) -> Self
Construct a new PathItem with provided Operation mapped to given HttpMethod.
Sourcepub fn from_http_methods<I: IntoIterator<Item = HttpMethod>, O: Into<Operation>>(
http_methods: I,
operation: O,
) -> Self
pub fn from_http_methods<I: IntoIterator<Item = HttpMethod>, O: Into<Operation>>( http_methods: I, operation: O, ) -> Self
Constructs a new PathItem with given Operation set for provided HttpMethods.