Swagger Schema

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
  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值