pub struct Components {
pub schemas: Option<IndexMap<String, Schema>>,
pub responses: Option<IndexMap<String, ObjectOrReference<Response>>>,
pub parameters: Option<IndexMap<String, ObjectOrReference<Parameter>>>,
pub examples: Option<IndexMap<String, ObjectOrReference<Example>>>,
pub request_bodies: Option<IndexMap<String, ObjectOrReference<RequestBody>>>,
pub headers: Option<IndexMap<String, ObjectOrReference<Header>>>,
pub security_schemes: Option<IndexMap<String, ObjectOrReference<SecurityScheme>>>,
pub links: Option<IndexMap<String, ObjectOrReference<Link>>>,
pub callbacks: Option<IndexMap<String, ObjectOrReference<Callback>>>,
}
Expand description
Holds a set of reusable objects for different aspects of the OAS.
All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#componentsObject.
Fields§
§schemas: Option<IndexMap<String, Schema>>
An object to hold reusable Schema Objects.
responses: Option<IndexMap<String, ObjectOrReference<Response>>>
An object to hold reusable Response Objects.
parameters: Option<IndexMap<String, ObjectOrReference<Parameter>>>
An object to hold reusable Parameter Objects.
examples: Option<IndexMap<String, ObjectOrReference<Example>>>
An object to hold reusable Example
request_bodies: Option<IndexMap<String, ObjectOrReference<RequestBody>>>
An object to hold reusable Request Body Objects.
headers: Option<IndexMap<String, ObjectOrReference<Header>>>
An object to hold reusable Header Objects.
security_schemes: Option<IndexMap<String, ObjectOrReference<SecurityScheme>>>
An object to hold reusable Security Scheme Objects.
links: Option<IndexMap<String, ObjectOrReference<Link>>>
An object to hold reusable Link Objects.
callbacks: Option<IndexMap<String, ObjectOrReference<Callback>>>
An object to hold reusable Callback Objects.
Trait Implementations§
Source§impl Clone for Components
impl Clone for Components
Source§fn clone(&self) -> Components
fn clone(&self) -> Components
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Components
impl Debug for Components
Source§impl Default for Components
impl Default for Components
Source§fn default() -> Components
fn default() -> Components
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Components
impl<'de> Deserialize<'de> for Components
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
Source§impl PartialEq for Components
impl PartialEq for Components
Source§impl Serialize for Components
impl Serialize for Components
impl StructuralPartialEq for Components
Auto Trait Implementations§
impl Freeze for Components
impl RefUnwindSafe for Components
impl Send for Components
impl Sync for Components
impl Unpin for Components
impl UnwindSafe for Components
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more