pub struct Items {Show 18 fields
pub schema_type: ParameterSchemaType,
pub format: Option<String>,
pub items: Option<Box<Items>>,
pub collection_format: Option<bool>,
pub default: Option<Value>,
pub maximum: Option<f64>,
pub exclusive_maximum: Option<bool>,
pub minimum: Option<f64>,
pub exclusive_minimum: Option<bool>,
pub max_length: Option<i64>,
pub min_length: Option<i64>,
pub pattern: Option<String>,
pub max_items: Option<i64>,
pub min_items: Option<i64>,
pub unique_items: Option<bool>,
pub enum_values: Vec<Value>,
pub multiple_of: Option<i64>,
pub x_fields: HashMap<String, Value>,
}
Expand description
Items Object
A limited subset of JSON-Schema’s items object. It is used by parameter definitions that are not located in “body”.
Fields§
§schema_type: ParameterSchemaType
Required. 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). The value MUST be one of “string”, “number”, “integer”, “boolean”, “array” or “file”. If type is “file”, the consumes MUST be either “multipart/form-data”, “ application/x-www-form-urlencoded“ or both and the parameter MUST be in “formData”.
format: Option<String>
The extending format for the previously mentioned type. See Data Type Formats for further details.
items: Option<Box<Items>>
Required if type is “array”. Describes the type of items in the array.
collection_format: Option<bool>
Determines the format of the array if type array is used. Possible values are:
- csv - comma separated values foo,bar.
- ssv - space separated values foo bar.
- tsv - tab separated values foo\tbar.
- pipes - pipe separated values foo|bar.
- multi - corresponds to multiple parameter instances instead of multiple values for a single instance foo=bar&foo=baz. This is valid only for parameters in “query” or “formData”.
Default value is csv.
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.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for this parameter.
maximum: Option<f64>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
exclusive_maximum: Option<bool>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
minimum: Option<f64>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
exclusive_minimum: Option<bool>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
max_length: Option<i64>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1.
min_length: Option<i64>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2.
pattern: Option<String>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
max_items: Option<i64>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2.
min_items: Option<i64>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3.
unique_items: Option<bool>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4.
enum_values: Vec<Value>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1.
multiple_of: Option<i64>
See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1.
x_fields: HashMap<String, Value>
Allows extensions to the Swagger Schema. The field name MUST begin with x-, for example, x-internal-id. The value can be null, a primitive, an array or an object. See Vendor Extensions for further details.