items

package
v0.34.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ErrItems is the sentinel error for all errors originating from the items package.
	ErrItems itemsError = "builders:items"
)

Variables

This section is empty.

Functions

func ParseArrayTypes

func ParseArrayTypes(taggers []parsers.TagParser, name string, expr ast.Expr, items *spec.Items, level int) ([]parsers.TagParser, error)

ParseArrayTypes recursively builds tag parsers for nested array types.

func Taggers

func Taggers(items *spec.Items, level int) []parsers.TagParser

Taggers builds tag parsers for array items at a given nesting level.

Types

type Typable

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

func NewTypable

func NewTypable(items *oaispec.Items, level int, in string) Typable

func (Typable) AddExtension

func (pt Typable) AddExtension(key string, value any)

func (Typable) In

func (pt Typable) In() string

func (Typable) Items

func (pt Typable) Items() ifaces.SwaggerTypable

func (Typable) Level

func (pt Typable) Level() int

func (Typable) Schema

func (pt Typable) Schema() *oaispec.Schema

func (Typable) SetRef

func (pt Typable) SetRef(ref oaispec.Ref)

func (Typable) Typed

func (pt Typable) Typed(tpe, format string)

func (Typable) WithEnum

func (pt Typable) WithEnum(values ...any)

func (Typable) WithEnumDescription

func (pt Typable) WithEnumDescription(_ string)

type Validations

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

func (Validations) SetCollectionFormat

func (sv Validations) SetCollectionFormat(val string)

func (Validations) SetDefault

func (sv Validations) SetDefault(val any)

func (Validations) SetEnum

func (sv Validations) SetEnum(val string)

func (Validations) SetExample

func (sv Validations) SetExample(val any)

func (Validations) SetMaxItems

func (sv Validations) SetMaxItems(val int64)

func (Validations) SetMaxLength

func (sv Validations) SetMaxLength(val int64)

func (Validations) SetMaximum

func (sv Validations) SetMaximum(val float64, exclusive bool)

func (Validations) SetMinItems

func (sv Validations) SetMinItems(val int64)

func (Validations) SetMinLength

func (sv Validations) SetMinLength(val int64)

func (Validations) SetMinimum

func (sv Validations) SetMinimum(val float64, exclusive bool)

func (Validations) SetMultipleOf

func (sv Validations) SetMultipleOf(val float64)

func (Validations) SetPattern

func (sv Validations) SetPattern(val string)

func (Validations) SetUnique

func (sv Validations) SetUnique(val bool)

Jump to

Keyboard shortcuts

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