[][src]Struct openapi::v2::Spec

pub struct Spec {
    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>>,
}

top level document

Fields

swagger: String

The Swagger version of this document.

info: Infohost: Option<String>

The host (name or ip) of the API. Example: 'swagger.io' ^1+(?::\d+)?$


  1.  
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.

tags: Option<Vec<Tag>>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

impl Clone for Spec[src]

impl Debug for Spec[src]

impl Default for Spec[src]

impl<'de> Deserialize<'de> for Spec[src]

impl PartialEq<Spec> for Spec[src]

impl Serialize for Spec[src]

impl StructuralPartialEq for Spec[src]

Auto Trait Implementations

impl RefUnwindSafe for Spec

impl Send for Spec

impl Sync for Spec

impl Unpin for Spec

impl UnwindSafe for Spec

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.