如何找到招摇的路径
how to find the swagger path
我有以下 swagger 配置。现在我在浏览器中打开 swagger-ui 的 swagger 路径是什么。
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.regex(".*/v2/accounts/.*"))
.build()
.securitySchemes(Collections.singletonList(apiKey()))
.securityContexts(Collections.singletonList(securityContext()));
您可以使用以下方法:
- 使用命令在节点包 http-server 上全局安装 -
npm install -g http-server
- 运行
http-server --cors
将目录更改为 your.json
所在的位置后
- 张扬ui(即dist/index.html)
- 输入http://localhost:8080/your.json然后点击"Explore"
我有以下 swagger 配置。现在我在浏览器中打开 swagger-ui 的 swagger 路径是什么。
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.regex(".*/v2/accounts/.*"))
.build()
.securitySchemes(Collections.singletonList(apiKey()))
.securityContexts(Collections.singletonList(securityContext()));
您可以使用以下方法:
- 使用命令在节点包 http-server 上全局安装 -
npm install -g http-server
- 运行
http-server --cors
将目录更改为your.json
所在的位置后 - 张扬ui(即dist/index.html)
- 输入http://localhost:8080/your.json然后点击"Explore"