Documentation ¶
Index ¶
- type Generator
- type Option
- func AllowDeleteBody(b bool) Option
- func DescriptorFilePath(protoName, descriptorFile string) Option
- func DisableDefaultErrors(b bool) Option
- func EnumsAsInts(b bool) Option
- func MergeFileName(name string) Option
- func PreserveRPCOrder() Option
- func RecursiveDepth(depth int) Option
- func UseJSONNamesForFields(b bool) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) Gen ¶
func (g *Generator) Gen(req *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
type Option ¶
type Option func(gen *Generator)
func AllowDeleteBody ¶
func DescriptorFilePath ¶
DescriptorFilePath: @usage: generator.DescriptorFilePath("myapp.proto", "pkg/mygroup/myapp.descriptor.pb")
func DisableDefaultErrors ¶
DisableDefaultErrors if set, disables generation of default errors. This is useful if you have defined custom error handling
func EnumsAsInts ¶
EnumsAsInts whether to render enum values as integers, as opposed to string values
func MergeFileName ¶
MergeFileName target OpenAPI file name prefix after merge
func PreserveRPCOrder ¶
func PreserveRPCOrder() Option
func RecursiveDepth ¶
RecursiveDepth maximum recursion count allowed for a field type
func UseJSONNamesForFields ¶
UseJSONNamesForFields if disabled, the original proto name will be used for generating OpenAPI definitions
Directories ¶
Path | Synopsis |
---|---|
Package genopenapi provides a code generator for OpenAPI v2.
|
Package genopenapi provides a code generator for OpenAPI v2. |
Click to show internal directories.
Click to hide internal directories.