指定外层响应结构
This commit is contained in:
11
main.go
11
main.go
@@ -5,8 +5,9 @@ import (
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/devttl/goctl-swagger/action"
|
||||
"github.com/devttl/goctl-swagger/generate"
|
||||
"github.com/urfave/cli/v2"
|
||||
"github.com/zeromicro/goctl-swagger/action"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -33,6 +34,14 @@ var (
|
||||
Name: "schemes",
|
||||
Usage: "swagger support schemes: http, https, ws, wss",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "pack", // 开启外层响应包装并指定外层响应结构名称
|
||||
Usage: "use outer packaging response and specify the name, example: Response",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "response", // 指定外层响应结构
|
||||
Usage: "outer packaging response structure, example: " + fmt.Sprintf("%q", generate.DefaultResponseJson),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user