allow to catch response headers

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-11-15 12:53:04 +03:00
parent 3591d02d42
commit 83b6567d3e
8 changed files with 103 additions and 16 deletions

View File

@@ -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