schemautil

package
v1.57.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamedOrInlineStruct

func NamedOrInlineStruct(meta map[uint32]*schema.Decl, t *schema.Type) (*schema.Struct, []*schema.Type)

NamedOrInlineStruct returns the struct type and type arguments for a named or inline struct. Returns nil if the type is neither a named struct nor an inline struct.

func StructBits

func StructBits(s *schema.Struct, method string, asResponse bool, asGoStruct bool, queryParamsAsObject bool) (query, headers, cookies, jsonBody string)

StructBits generates JSON representations of a struct's fields separated by location It returns query, headers, cookies, and JSON body as strings

Types

type DescribedField

type DescribedField struct {
	*schema.Field
	SrcName  string
	Name     string
	Location FieldLocation
}

DescribedField is a field with additional metadata

type FieldLocation

type FieldLocation int

FieldLocation represents where a field is located in the API request/response

const (
	FieldLocationBody   FieldLocation = 0
	FieldLocationQuery  FieldLocation = 1
	FieldLocationHeader FieldLocation = 2
	FieldLocationCookie FieldLocation = 3
	FieldLocationUnused FieldLocation = 4
)

Jump to

Keyboard shortcuts

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