pub struct PathItem {Show 14 fields
pub reference: Option<String>,
pub summary: Option<String>,
pub description: Option<String>,
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 servers: Vec<Server>,
pub parameters: Vec<ReferenceOr<Parameter>>,
pub extensions: IndexMap<String, Value>,
}
Expand description
Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.
Fields§
§reference: Option<String>
Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving Relative References.
summary: Option<String>
An optional, string summary, intended to apply to all operations in this path.
description: Option<String>
An optional, string description, intended to apply to all operations in this path. CommonMark syntax MAY be used for rich text representation.
get: Option<Operation>
§put: Option<Operation>
§post: Option<Operation>
§delete: Option<Operation>
§options: Option<Operation>
§head: Option<Operation>
§patch: Option<Operation>
§trace: Option<Operation>
§servers: Vec<Server>
An alternative server array to service all operations in this path.
parameters: Vec<ReferenceOr<Parameter>>
A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. 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.
extensions: IndexMap<String, Value>
Inline extensions to this object.
Implementations§
source§impl PathItem
impl PathItem
sourcepub fn merge(self, other: Self) -> Self
pub fn merge(self, other: Self) -> Self
Merges two path items as well as it can. Global settings will likely conflict. Conflicts always favor self.
sourcepub fn merge_with(&mut self, other: Self)
pub fn merge_with(&mut self, other: Self)
Merges self with other path item as well as it can. Global settings will likely conflict. Conflicts always favor self.
Trait Implementations§
source§impl<'de> Deserialize<'de> for PathItem
impl<'de> Deserialize<'de> for PathItem
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>,
source§impl IntoIterator for PathItem
impl IntoIterator for PathItem
source§impl JsonSchema for PathItem
impl JsonSchema for PathItem
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more