pub struct Parameter {Show 24 fields
pub name: String,
pub in: ParamInEnum,
pub description: Option<String>,
pub required: Option<bool>,
pub schema: Option<Schema>,
pub type: Option<ParameterType>,
pub format: Option<String>,
pub allow_empty_value: Option<bool>,
pub items: Option<Items>,
pub collection_format: Option<String>,
pub default: Option<Value>,
pub maximum: Option<Number>,
pub exclusive_maximum: Option<bool>,
pub minimum: Option<Number>,
pub exclusive_minimum: Option<bool>,
pub max_length: Option<Number>,
pub min_length: Option<Number>,
pub pattern: Option<String>,
pub max_items: Option<Number>,
pub min_items: Option<Number>,
pub unique_items: Option<bool>,
pub enum: Option<Vec<Value>>,
pub multiple_of: Option<Number>,
pub extensions: Extensions,
}
Expand description
§Parameter
Describes a single operation parameter. see https://swagger.io/specification/v2/#parameter-object.
Fields§
§name: String
The name of the parameter.
in: ParamInEnum
The location of the parameter. Possible values are “query”, “header”, “path”, “formData” or “body”.
description: Option<String>
A brief description of the parameter.
required: Option<bool>
Determines whether this parameter is mandatory.
If the parameter is in “path”, this property is required and its value MUST be true
. Otherwise, the property MAY be included and its default value is false
.
schema: Option<Schema>
The schema defining the type used for the body parameter. If the parameter is in “body”, this property is required
type: Option<ParameterType>
The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object).
format: Option<String>
The extending format for the previously mentioned type. See Data Type Formats for further details.
allow_empty_value: Option<bool>
Sets the ability to pass empty-valued parameters.
items: Option<Items>
Required if type
is “array”. Describes the type of items in the array.
collection_format: Option<String>
Determines the format of the array if type array is used.
default: Option<Value>
Declares the value of the parameter that the server will use if none is provided, for example a “count” to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: “default” has no meaning for required parameters.)
maximum: Option<Number>
§exclusive_maximum: Option<bool>
§minimum: Option<Number>
§exclusive_minimum: Option<bool>
§max_length: Option<Number>
§min_length: Option<Number>
§pattern: Option<String>
§max_items: Option<Number>
§min_items: Option<Number>
§unique_items: Option<bool>
§enum: Option<Vec<Value>>
§multiple_of: Option<Number>
§extensions: Extensions