[][src]Struct paperclip::v2::models::Api

pub struct Api<S> {
    pub swagger: Version,
    pub definitions: BTreeMap<String, SchemaRepr<S>>,
    pub paths: BTreeMap<String, OperationMap<S>>,
}

OpenAPI v2 spec.

Fields

swagger: Versiondefinitions: BTreeMap<String, SchemaRepr<S>>paths: BTreeMap<String, OperationMap<S>>

Methods

impl<S: Schema> Api<S>[src]

pub fn resolve(self) -> Result<Api<S>, Error>[src]

Consumes this API schema, resolves the references and returns the resolved schema.

This walks recursively, collects the referenced schema objects, substitutes the referenced IDs with the pointer to schema objects and returns the resolved object or an error if it encountered one.

Trait Implementations

impl<S: Clone> Clone for Api<S>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<S: Debug> Debug for Api<S>[src]

impl<'de, S> Deserialize<'de> for Api<S> where
    S: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<S> Send for Api<S> where
    S: Send + Sync

impl<S> Sync for Api<S> where
    S: Send + Sync

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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

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