pub struct Swagger {Show 16 fields
pub swagger: String,
pub info: Info,
pub host: Option<String>,
pub base_path: Option<String>,
pub schemas: Option<Vec<TransferProtocol>>,
pub consumes: Option<String>,
pub produces: Option<String>,
pub paths: BTreeMap<String, PathItem>,
pub definitions: Option<BTreeMap<String, Schema>>,
pub parameters: Option<BTreeMap<String, Parameter>>,
pub responses: Option<BTreeMap<String, Response>>,
pub security_definitions: Option<BTreeMap<String, SecurityScheme>>,
pub security: Option<Vec<SecurityRequirementObject>>,
pub tags: Option<Vec<Tag>>,
pub external_docs: Option<ExternalDoc>,
pub extensions: Extensions,
}
Expand description
Fields§
§swagger: String
2.0
info: Info
Provides metadata about the API. The metadata can be used by the clients if needed.
host: Option<String>
The host (name or ip) serving the API.
base_path: Option<String>
The base path on which the API is served, which is relative to the host.
schemas: Option<Vec<TransferProtocol>>
The transfer protocol of the API.
consumes: Option<String>
A list of MIME types the APIs can consume.
produces: Option<String>
A list of MIME types the APIs can produce.
paths: BTreeMap<String, PathItem>
The available paths and operations for the API.
definitions: Option<BTreeMap<String, Schema>>
An object to hold data types produced and consumed by operations.
parameters: Option<BTreeMap<String, Parameter>>
An object to hold parameters that can be used across operations. This property does not define global parameters for all operations.
responses: Option<BTreeMap<String, Response>>
An object to hold responses that can be used across operations. This property does not define global responses for all operations.
security_definitions: Option<BTreeMap<String, SecurityScheme>>
Security scheme definitions that can be used across the specification.
security: Option<Vec<SecurityRequirementObject>>
A declaration of which security schemes are applied for the API as a whole.
A list of tags used by the specification with additional metadata.
external_docs: Option<ExternalDoc>
Additional external documentation.
extensions: Extensions
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.