parser

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumInfo

type EnumInfo struct {
	BaseType string
	Values   []any
}

type FieldInfo

type FieldInfo struct {
	Name       string
	Type       *TypeRef
	JSONName   string
	Doc        string
	Example    string
	Default    string
	Required   bool
	Validate   string
	PathParam  string
	QueryParam string
	Header     string
}

type OperationInfo

type OperationInfo struct {
	Annotation   *annotation.Operation
	RequestType  *TypeRef
	ResponseType *TypeRef
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New() *Parser

func (*Parser) Enums

func (p *Parser) Enums() map[string]*EnumInfo

func (*Parser) Load

func (p *Parser) Load(patterns ...string) error

func (*Parser) LoadDir

func (p *Parser) LoadDir(dir string, patterns ...string) error

func (*Parser) Operations

func (p *Parser) Operations() []*OperationInfo

func (*Parser) Types

func (p *Parser) Types() map[string]*TypeInfo

type TypeInfo

type TypeInfo struct {
	Name     string
	Fields   []*FieldInfo
	Embedded []string
}

type TypeRef

type TypeRef struct {
	Name    string
	IsPtr   bool
	IsSlice bool
	IsMap   bool
	MapKey  string
	Elem    *TypeRef
}

Jump to

Keyboard shortcuts

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