pub struct Spec {Show 15 fields
pub swagger: String,
pub info: Info,
pub host: Option<String>,
pub base_path: Option<String>,
pub schemes: Option<Vec<Scheme>>,
pub consumes: Option<Vec<String>>,
pub produces: Option<Vec<String>>,
pub tags: Option<Vec<Tag>>,
pub paths: BTreeMap<String, PathItem>,
pub definitions: Option<BTreeMap<String, Schema>>,
pub parameters: Option<BTreeMap<String, Parameter>>,
pub responses: Option<BTreeMap<String, Response>>,
pub security_definitions: Option<BTreeMap<String, Security>>,
pub security: Option<Vec<BTreeMap<String, Vec<String>>>>,
pub external_docs: Option<Vec<ExternalDoc>>,
}Expand description
top level document
Fields§
§swagger: StringThe Swagger version of this document.
info: Info§host: Option<String>The host (name or ip) of the API. Example: ‘swagger.io’ ^[^{}/ :\\]+(?::\d+)?$
base_path: Option<String>The base path to the API. Example: ‘/api’.
schemes: Option<Vec<Scheme>>§consumes: Option<Vec<String>>A list of MIME types accepted by the API.
produces: Option<Vec<String>>A list of MIME types the API can produce.
paths: BTreeMap<String, PathItem>Relative paths to the individual endpoints. They must be relative to the ‘basePath’.
definitions: Option<BTreeMap<String, Schema>>§parameters: Option<BTreeMap<String, Parameter>>§responses: Option<BTreeMap<String, Response>>mappings to http response codes or “default”
security_definitions: Option<BTreeMap<String, Security>>§security: Option<Vec<BTreeMap<String, Vec<String>>>>§external_docs: Option<Vec<ExternalDoc>>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Spec
impl<'de> Deserialize<'de> for Spec
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
impl StructuralPartialEq for Spec
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
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