在OpenAPI 3中,我必须在YAML中进行哪些更改,以便Swagger YAML中的服务器下拉是一个文本框,Devs可以在其中放入自己的Apipaths来测试自己的部署。
In OpenAPI 3, what changes would I have to make in the yaml so that the dropdown of Servers in the swagger yaml is instead a text box where devs can put in their own ApiPaths for testing their own deployments.
因此,这样做。
servers: - url: https://{customerId}.saas-app.com:{port}/v2 variables: customerId: default: demo description: Customer ID assigned by the service provider port: enum: - '443' - '8443' default: '443'
在这种情况下, customerId 将以招摇中的文本框出现。
customerId
So the Server Templating section in https://swagger.io/docs/specification/api-host-and-base-path/ does just this.
In this case customerId will show up as a text box in the swagger.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
因此,这样做。
在这种情况下,
customerId
将以招摇中的文本框出现。So the Server Templating section in https://swagger.io/docs/specification/api-host-and-base-path/ does just this.
In this case
customerId
will show up as a text box in the swagger.