pub struct OpenAPI {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: IndexMap<String, PathItem>,
pub definitions: Option<IndexMap<String, Schema>>,
pub parameters: Option<IndexMap<String, Parameter>>,
pub responses: Option<IndexMap<String, Response>>,
pub security_definitions: Option<IndexMap<String, Security>>,
pub security: Option<Vec<IndexMap<String, Vec<String>>>>,
pub external_docs: Option<Vec<ExternalDoc>>,
}
Available on crate feature
v2
only.Expand description
top level document
Fields§
§swagger: String
The 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: IndexMap<String, PathItem>
Relative paths to the individual endpoints. They must be relative to the ‘basePath’.
definitions: Option<IndexMap<String, Schema>>
§parameters: Option<IndexMap<String, Parameter>>
§responses: Option<IndexMap<String, Response>>
mappings to http response codes or “default”
security_definitions: Option<IndexMap<String, Security>>
§security: Option<Vec<IndexMap<String, Vec<String>>>>
§external_docs: Option<Vec<ExternalDoc>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OpenAPI
impl<'de> Deserialize<'de> for OpenAPI
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 OpenAPI
Auto Trait Implementations§
impl Freeze for OpenAPI
impl RefUnwindSafe for OpenAPI
impl Send for OpenAPI
impl Sync for OpenAPI
impl Unpin for OpenAPI
impl UnwindSafe for OpenAPI
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