update readme

This commit is contained in:
MaxToby 2021-01-22 09:50:32 +08:00
parent 2870171cd2
commit 84b1c872c6

View File

@ -85,10 +85,12 @@ $ GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/zeromic
```shell script ```shell script
$ docker run --rm -p 8083:8080 -e SWAGGER_JSON=/foo/user.json -v $PWD:/foo swaggerapi/swagger-ui $ docker run --rm -p 8083:8080 -e SWAGGER_JSON=/foo/user.json -v $PWD:/foo swaggerapi/swagger-ui
``` ```
* Swagger Codegen 生成客户端调用代码 * Swagger Codegen 生成客户端调用代码(go,javascript,php)
```shell script ```shell script
$ docker run --rm -v "$(pwd):/go-work" swaggerapi/swagger-codegen-cli generate \ for l in go javascript php; do
-i "/go-work/user.json" \ docker run --rm -v "$(pwd):/go-work" swaggerapi/swagger-codegen-cli generate \
-l "$l" \ -i "/go-work/rest.swagger.json" \
-o "/go-work/clients/$l" -l "$l" \
-o "/go-work/clients/$l"
done
``` ```