pub struct Components {
pub schemas: Option<BTreeMap<String, Referenceable<Schema>>>,
pub responses: Option<BTreeMap<String, Referenceable<Response>>>,
pub parameters: Option<BTreeMap<String, Referenceable<Parameter>>>,
pub examples: Option<BTreeMap<String, Referenceable<Example>>>,
pub request_bodies: Option<BTreeMap<String, Referenceable<RequestBody>>>,
pub headers: Option<BTreeMap<String, Referenceable<Header>>>,
pub security_schemes: Option<BTreeMap<String, Referenceable<SecurityScheme>>>,
pub links: Option<BTreeMap<String, Referenceable<Link>>>,
pub callbacks: Option<BTreeMap<String, Referenceable<Callback>>>,
}Expand description
Holds a set of reusable objects for different aspects of the OAS.
Fields§
§schemas: Option<BTreeMap<String, Referenceable<Schema>>>An object to hold reusable Schema Objects.
responses: Option<BTreeMap<String, Referenceable<Response>>>An object to hold reusable Response Objects.
parameters: Option<BTreeMap<String, Referenceable<Parameter>>>An object to hold reusable Parameter Objects.
examples: Option<BTreeMap<String, Referenceable<Example>>>An object to hold reusable Example Objects.
request_bodies: Option<BTreeMap<String, Referenceable<RequestBody>>>An object to hold reusable Request Body Objects.
headers: Option<BTreeMap<String, Referenceable<Header>>>An object to hold reusable Header Objects.
security_schemes: Option<BTreeMap<String, Referenceable<SecurityScheme>>>An object to hold reusable Security Scheme Objects.
links: Option<BTreeMap<String, Referenceable<Link>>>An object to hold reusable Link Objects.
callbacks: Option<BTreeMap<String, Referenceable<Callback>>>An object to hold reusable Callback Objects.
Implementations§
Source§impl Components
impl Components
pub fn new() -> Self
pub fn with_schemas( self, schemas: BTreeMap<String, Referenceable<Schema>>, ) -> Self
pub fn with_responses( self, responses: BTreeMap<String, Referenceable<Response>>, ) -> Self
pub fn with_parameters( self, parameters: BTreeMap<String, Referenceable<Parameter>>, ) -> Self
Trait Implementations§
Source§impl Clone for Components
impl Clone for Components
Source§fn clone(&self) -> Components
fn clone(&self) -> Components
Returns a duplicate 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§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
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