Swagger Local Editor 更改服务 host/port

Swagger Local Editor change Service host/port

我想使用 Swagger 编辑器来测试我使用 Grizzly 部署的 REST 服务。 我的服务位于与 Swagger 编辑器 (8080) 不同的端口 (8081) 上。 我如何告诉编辑器(本地或在线)使用另一个端口?

谢谢

找到答案,还没有测试:

在swagger对象下,有个固定的字段叫host:

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.

摘自: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md