mirror of https://github.com/zhufuyi/sponge
feat: change swagger command
This commit is contained in:
parent
85c243d643
commit
2eda08a3ad
|
@ -279,8 +279,8 @@ func NewCenter(configFile string) (*Center, error) {
|
|||
|
||||
checkResult $?
|
||||
|
||||
sponge web swagger2-to-openapi3 --file=docs/apis.swagger.json > /dev/null 2>&1
|
||||
sponge web swagger --file=docs/apis.swagger.json > /dev/null 2>&1
|
||||
# handle apis.swagger.json
|
||||
sponge web swagger --enable-standardize-response --enable-to-openapi3 --enable-integer-to-string --file=docs/apis.swagger.json > /dev/null
|
||||
|
||||
moduleName=$(cat docs/gen.info | head -1 | cut -d , -f 1)
|
||||
serverName=$(cat docs/gen.info | head -1 | cut -d , -f 2)
|
||||
|
@ -308,8 +308,8 @@ func NewCenter(configFile string) (*Center, error) {
|
|||
|
||||
checkResult $?
|
||||
|
||||
sponge web swagger2-to-openapi3 --file=docs/apis.swagger.json > /dev/null 2>&1
|
||||
sponge web swagger --file=docs/apis.swagger.json > /dev/null 2>&1
|
||||
# handle apis.swagger.json
|
||||
sponge web swagger --enable-standardize-response --enable-to-openapi3 --enable-integer-to-string --file=docs/apis.swagger.json > /dev/null
|
||||
|
||||
moduleName=$(cat docs/gen.info | head -1 | cut -d , -f 1)
|
||||
serverName=$(cat docs/gen.info | head -1 | cut -d , -f 2)
|
||||
|
@ -337,8 +337,8 @@ func NewCenter(configFile string) (*Center, error) {
|
|||
|
||||
checkResult $?
|
||||
|
||||
sponge web swagger2-to-openapi3 --file=docs/apis.swagger.json > /dev/null 2>&1
|
||||
sponge web swagger --file=docs/apis.swagger.json > /dev/null 2>&1
|
||||
# handle apis.swagger.json
|
||||
sponge web swagger --enable-standardize-response --enable-to-openapi3 --enable-integer-to-string --file=docs/apis.swagger.json > /dev/null
|
||||
|
||||
moduleName=$(cat docs/gen.info | head -1 | cut -d , -f 1)
|
||||
serverName=$(cat docs/gen.info | head -1 | cut -d , -f 2)
|
||||
|
|
|
@ -201,7 +201,7 @@ function generateBySpecifiedProto(){
|
|||
checkResult $?
|
||||
|
||||
# handle apis.swagger.json
|
||||
sponge web swagger --enable-standardize-response --enable-to-openapi3 --enable-integer-to-string --file=docs/apis.swagger.json > /dev/null 2>&1
|
||||
sponge web swagger --enable-standardize-response --enable-to-openapi3 --enable-integer-to-string --file=docs/apis.swagger.json > /dev/null
|
||||
|
||||
# A total of four files are generated: the registration route file *_router.pb.go (saved in the same directory as the protobuf file),
|
||||
# the injection route file *_router.go (saved in internal/routers by default), the logic code template file *.go (saved in internal/service by default),
|
||||
|
|
|
@ -30,7 +30,7 @@ checkResult $?
|
|||
sponge patch modify-dup-num --dir=internal/ecode
|
||||
sponge patch modify-dup-err-code --dir=internal/ecode
|
||||
# handle swagger.json
|
||||
sponge web swagger --enable-standardize-response --enable-to-openapi3 --enable-integer-to-string --file=docs/swagger.json > /dev/null 2>&1
|
||||
sponge web swagger --enable-to-openapi3 --enable-integer-to-string --file=docs/swagger.json > /dev/null
|
||||
|
||||
colorGreen='\033[1;32m'
|
||||
colorCyan='\033[1;36m'
|
||||
|
|
Loading…
Reference in New Issue