feature: 支持指定schemes参数

This commit is contained in:
waouooo
2023-11-19 12:39:59 +08:00
parent c76c668b5f
commit f5343a24b7
5 changed files with 25 additions and 6 deletions

View File

@ -86,10 +86,10 @@ GOPROXY=https://goproxy.cn/,direct go install github.com/zeromicro/goctl-swagger
goctl api plugin -plugin goctl-swagger="swagger -filename user.json" -api user.api -dir .
```
* 指定HostbasePath [api-host-and-base-path](https://swagger.io/docs/specification/2-0/api-host-and-base-path/)
* 指定HostbasePathschemes [api-host-and-base-path](https://swagger.io/docs/specification/2-0/api-host-and-base-path/)
```shell script
goctl api plugin -plugin goctl-swagger="swagger -filename user.json -host 127.0.0.2 -basepath /api" -api user.api -dir .
goctl api plugin -plugin goctl-swagger="swagger -filename user.json -host 127.0.0.2 -basepath /api -schemes https,wss" -api user.api -dir .
```
* swagger ui 查看生成的文档