pub struct Components {
pub schemas: BTreeMap<String, ReferenceOr<Schema>>,
pub responses: BTreeMap<String, ReferenceOr<Response>>,
pub parameters: BTreeMap<String, ReferenceOr<Parameter>>,
pub examples: BTreeMap<String, ReferenceOr<Example>>,
pub request_bodies: BTreeMap<String, ReferenceOr<RequestBody>>,
pub headers: BTreeMap<String, ReferenceOr<Header>>,
pub security_schemes: BTreeMap<String, ReferenceOr<SecurityScheme>>,
pub links: BTreeMap<String, ReferenceOr<Link>>,
pub callbacks: BTreeMap<String, ReferenceOr<Callback>>,
pub extensions: IndexMap<String, Value>,
}
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.
Fields§
§schemas: BTreeMap<String, ReferenceOr<Schema>>
An object to hold reusable Schema Objects.
responses: BTreeMap<String, ReferenceOr<Response>>
An object to hold reusable Response Objects.
parameters: BTreeMap<String, ReferenceOr<Parameter>>
An object to hold reusable Parameter Objects.
examples: BTreeMap<String, ReferenceOr<Example>>
An object to hold reusable Example Objects.
request_bodies: BTreeMap<String, ReferenceOr<RequestBody>>
An object to hold reusable Request Body Objects.
headers: BTreeMap<String, ReferenceOr<Header>>
An object to hold reusable Header Objects.
security_schemes: BTreeMap<String, ReferenceOr<SecurityScheme>>
An object to hold reusable Security Scheme Objects.
links: BTreeMap<String, ReferenceOr<Link>>
An object to hold reusable Link Objects.
callbacks: BTreeMap<String, ReferenceOr<Callback>>
An object to hold reusable Callback Objects.
extensions: IndexMap<String, Value>
This object MAY be extended with Specification Extensions.
Implementations§
Source§impl Components
impl Components
pub fn merge(&mut self, other: Components)
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
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