allow to catch response headers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
3
main.go
3
main.go
@@ -18,6 +18,7 @@ var (
|
||||
flagComponents = flagSet.String("components", "micro|rpc|http|client|server|openapiv3", "specify components to generate")
|
||||
flagTagPath = flagSet.String("tag_path", "", "tag rewriting dir")
|
||||
flagOpenapiFile = flagSet.String("openapi_file", "apidocs.swagger.json", "openapi file name")
|
||||
flagReflection = flagSet.Bool("reflection", false, "enable server reflection support")
|
||||
flagHelp = flagSet.Bool("help", false, "display help message")
|
||||
)
|
||||
|
||||
@@ -45,6 +46,7 @@ type Generator struct {
|
||||
fieldaligment bool
|
||||
tagPath string
|
||||
openapiFile string
|
||||
reflection bool
|
||||
plugin *protogen.Plugin
|
||||
}
|
||||
|
||||
@@ -58,6 +60,7 @@ func (g *Generator) Generate(plugin *protogen.Plugin) error {
|
||||
g.fieldaligment = *flagFieldaligment
|
||||
g.tagPath = *flagTagPath
|
||||
g.openapiFile = *flagOpenapiFile
|
||||
g.reflection = *flagReflection
|
||||
plugin.SupportedFeatures = uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL)
|
||||
|
||||
var genClient bool
|
||||
|
||||
Reference in New Issue
Block a user