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

pub struct DefaultSchemaRaw {
    pub reference: Option<String>,
    pub title: Option<String>,
    pub description: Option<String>,
    pub data_type: Option<DataType>,
    pub format: Option<DataTypeFormat>,
    pub properties: BTreeMap<String, Box<DefaultSchemaRaw>>,
    pub items: Option<Either<Box<DefaultSchemaRaw>, Vec<Box<DefaultSchemaRaw>>>>,
    pub enum_: Vec<Value>,
    pub extra_props: Option<Either<bool, Box<DefaultSchemaRaw>>>,
    pub required: BTreeSet<String>,
    // some fields omitted
}

Raw version of schema.

NOTE: This doesn't have smart pointers to reuse definitions throughout the spec. Instead, it contains the actual schema with unresolvable $ref fields.

Default schema if your schema doesn't have any custom fields.

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#schemaObject

Fields

reference: Option<String>title: Option<String>description: Option<String>data_type: Option<DataType>format: Option<DataTypeFormat>properties: BTreeMap<String, Box<DefaultSchemaRaw>>items: Option<Either<Box<DefaultSchemaRaw>, Vec<Box<DefaultSchemaRaw>>>>enum_: Vec<Value>extra_props: Option<Either<bool, Box<DefaultSchemaRaw>>>required: BTreeSet<String>

Methods

impl DefaultSchemaRaw[src]

pub fn remove_refs(&mut self)[src]

Recursively removes all $ref values in this schema.

pub fn retain_ref(&mut self)[src]

Recursively removes all properties other than $ref value if the $ref is non-null.

Trait Implementations

impl Clone for DefaultSchemaRaw[src]

impl Debug for DefaultSchemaRaw[src]

impl Default for DefaultSchemaRaw[src]

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

impl Serialize for DefaultSchemaRaw[src]

Auto Trait Implementations

impl RefUnwindSafe for DefaultSchemaRaw

impl Send for DefaultSchemaRaw

impl Sync for DefaultSchemaRaw

impl Unpin for DefaultSchemaRaw

impl UnwindSafe for DefaultSchemaRaw

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

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,