generator

package
v2.5.1-0...-c92d36e Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: BSD-3-Clause Imports: 4 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
}

Generator is openapi v2 generator

func NewGenerator

func NewGenerator(options ...Option) *Generator

NewGenerator return Generator

func (*Generator) Gen

Gen generates openapi v2 json content

type Option

type Option func(gen *Generator)

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

Jump to

Keyboard shortcuts

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