InQuery

Struct InQuery 

Source
pub struct InQuery {
Show 13 fields pub name: String, pub description: Option<String>, pub required: Option<bool>, pub deprecated: Option<bool>, pub allow_empty_value: Option<bool>, pub style: Option<InQueryStyle>, pub explode: Option<bool>, pub allow_reserved: Option<bool>, pub schema: Option<RefOr<Schema>>, pub example: Option<Value>, pub examples: Option<BTreeMap<String, RefOr<Example>>>, pub content: Option<BTreeMap<String, MediaType>>, pub extensions: Option<BTreeMap<String, Value>>,
}
Expand description

Holds a parameter with in: query property.

Fields§

§name: String

Required The name of the parameter. Parameter names are case sensitive.

§description: Option<String>

A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.

§required: Option<bool>

Determines whether this parameter is mandatory. If the parameter location is “path”, this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.

§deprecated: Option<bool>

Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.

§allow_empty_value: Option<bool>

Sets the ability to pass empty-valued parameters. This allows sending a parameter with an empty value. Default value is false. If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.

§style: Option<InQueryStyle>

Describes how the parameter value will be serialized depending on the type of the parameter value. Default values is form.

§explode: Option<bool>

When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When style is form, the default value is true. For all other styles, the default value is false.

§allow_reserved: Option<bool>

Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986 :/?#[]@!$&'()*+,;= to be included without percent-encoding. The default value is false.

§schema: Option<RefOr<Schema>>

The schema defining the type used for the parameter.

§example: Option<Value>

Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.

§examples: Option<BTreeMap<String, RefOr<Example>>>

Examples of the parameter’s potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema that contains an example, the examples value SHALL override the example provided by the schema.

§content: Option<BTreeMap<String, MediaType>>

A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.

§extensions: Option<BTreeMap<String, Value>>

This object MAY be extended with Specification Extensions. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object.

Trait Implementations§

Source§

impl Clone for InQuery

Source§

fn clone(&self) -> InQuery

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InQuery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for InQuery

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for InQuery

Source§

fn eq(&self, other: &InQuery) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for InQuery

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl ValidateWithContext<Spec> for InQuery

Source§

fn validate_with_context(&self, ctx: &mut Context<'_, Spec>, path: String)

Source§

impl StructuralPartialEq for InQuery

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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