Schema
Swagger Object
This is the root document object for the API specification. It combines what previously was the Resource Listing and API Declaration (version 1.2 and earlier) together into one document.
这是API规范的根文档对象。它把此前的资源列表(Resource Listing)和API声明(Declaration)(1.2 及更早版本) 放到了一个文档里。
Fixed Fields
Field Name | Type | Description |
---|---|---|
swagger | string |
Required. Specifies the Swagger Specification version being used. It can be used by the Swagger UI and other clients to interpret the API listing. The value MUST be "2.0" . 必须 定义了所使用的Swagger定义的版本。可以被Swagger UI和其他客户端解释API列表。这个必须是"2.0"`. |
info | Info Object | Required. Provides metadata about the API. The metadata can be used by the clients if needed.必须字段提供了API的元数据信息。元数据必要的时候可以被客户端所使用。 |
host | string |
The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating. 提供API服务的主机名称或者IP。这个字段必须只能是主机名,而不是包好阔scheme和子路径。该字段可以包括一个端口号。如果未指定host 字段,提供当前文档本身的host将会被使用(包括端口)。host 字段不支持path templating. |
basePath | string |
The base path on which the API is served, which is relative to the host . If it is not included, the A |