generator

package
v0.0.0-...-d5de82d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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 NewGenerator(options ...Option) *Generator

func (*Generator) Gen

type Option

type Option func(gen *Generator)

func AllowDeleteBody

func AllowDeleteBody(b bool) Option

func DescriptorFilePath

func DescriptorFilePath(protoName, descriptorFile string) Option

DescriptorFilePath: @usage: generator.DescriptorFilePath("myapp.proto", "pkg/mygroup/myapp.descriptor.pb")

func DisableDefaultErrors

func DisableDefaultErrors(b bool) Option

DisableDefaultErrors if set, disables generation of default errors. This is useful if you have defined custom error handling

func EnumsAsInts

func EnumsAsInts(b bool) Option

EnumsAsInts whether to render enum values as integers, as opposed to string values

func MergeFileName

func MergeFileName(name string) Option

MergeFileName target OpenAPI file name prefix after merge

func PreserveRPCOrder

func PreserveRPCOrder() Option

func RecursiveDepth

func RecursiveDepth(depth int) Option

RecursiveDepth maximum recursion count allowed for a field type

func UseJSONNamesForFields

func UseJSONNamesForFields(b bool) Option

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL