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

pub struct Parameter<S> {
    pub description: Option<String>,
    pub in_: ParameterIn,
    pub name: String,
    pub required: bool,
    pub schema: Option<S>,
    pub data_type: Option<DataType>,
    pub format: Option<DataTypeFormat>,
    pub items: Option<Items>,
    pub collection_format: Option<CollectionFormat>,
    pub allow_empty_value: bool,
    pub default: Option<Value>,
    pub maximum: Option<f32>,
    pub exclusive_maximum: Option<bool>,
    pub minimum: Option<f32>,
    pub exclusive_minimum: Option<bool>,
    pub max_length: Option<u32>,
    pub min_length: Option<u32>,
    pub pattern: Option<String>,
    pub max_items: Option<u32>,
    pub min_items: Option<u32>,
    pub unique_items: bool,
    pub multiple_of: Option<f32>,
    pub enum_: Vec<Value>,
}

Request parameter object.

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

Fields

description: Option<String>in_: ParameterInname: Stringrequired: boolschema: Option<S>data_type: Option<DataType>format: Option<DataTypeFormat>items: Option<Items>collection_format: Option<CollectionFormat>allow_empty_value: booldefault: Option<Value>maximum: Option<f32>exclusive_maximum: Option<bool>minimum: Option<f32>exclusive_minimum: Option<bool>max_length: Option<u32>min_length: Option<u32>pattern: Option<String>max_items: Option<u32>min_items: Option<u32>unique_items: boolmultiple_of: Option<f32>enum_: Vec<Value>

Methods

impl<S> Parameter<Resolvable<S>> where
    S: Schema
[src]

pub fn check(&self, path: &str) -> Result<(), ValidationError>[src]

Checks the validity of this parameter using the relative URL path it's associated with.

Trait Implementations

impl<S> Clone for Parameter<S> where
    S: Clone
[src]

impl<S> Debug for Parameter<S> where
    S: Debug
[src]

impl<S> Default for Parameter<S> where
    S: Default
[src]

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

impl<S> PartialEq<Parameter<S>> for Parameter<S> where
    S: PartialEq<S>, 
[src]

impl<S> Serialize for Parameter<S> where
    S: Serialize
[src]

impl<S> StructuralPartialEq for Parameter<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for Parameter<S> where
    S: RefUnwindSafe

impl<S> Send for Parameter<S> where
    S: Send

impl<S> Sync for Parameter<S> where
    S: Sync

impl<S> Unpin for Parameter<S> where
    S: Unpin

impl<S> UnwindSafe for Parameter<S> where
    S: UnwindSafe

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>,