Documentation ¶
Index ¶
- func ArraySchema(items spec.SchemaOrRef, minLength uint32, maxLength uint32, unique bool) spec.Schema
- func ArraySchemaFor[T ~[]I, I any](m SchemaTypeMapping, minLength uint32, maxLength uint32, unique bool) spec.Schema
- func EnumOptionsString[T any](items []T, format func(item T) string) string
- func EnumSchema[T comparable](items ...T) spec.Schema
- func FloatSchema[T float](format spec.Format, min T, max T, multipleOf T) spec.Schema
- func IntSchema[T integer](format spec.Format, min T, max T, multipleOf T) spec.Schema
- func MarshalArrayJSON[T ~[]I, I any](items T) ([]byte, error)
- func MarshalFloat[T float](value T) ([]byte, error)
- func MarshalFloatEnum[T integer](value T) ([]byte, error)
- func MarshalInt[T integer](value T) ([]byte, error)
- func MarshalIntEnum[T integer](value T) ([]byte, error)
- func MarshalString[T ~string](value T) ([]byte, error)
- func MarshalStringEnum[T ~string](value T) ([]byte, error)
- func MarshalText(value any) ([]byte, error)
- func MarshalUint[T uinteger](value T) ([]byte, error)
- func MarshalUintEnum[T uinteger](value T) ([]byte, error)
- func ReflectRequest(t reflect.Type, ...)
- func StringSchema(format spec.Format, minLength uint32, maxLength uint32, regex *regexp.Regexp) spec.Schema
- func StructSchemaFor[T any](m SchemaTypeMapping) spec.Schema
- func StructSchemaOf(t reflect.Type, m SchemaTypeMapping) spec.Schema
- func UintSchema[T uinteger](format spec.Format, min T, max T, multipleOf T) spec.Schema
- func UnmarshalArrayJSON[T ~[]I, I any](dest *T, raw []byte, minLength uint32, maxLength uint32) error
- func UnmarshalArrayUniqueJSON[T ~[]I, I comparable](dest *T, raw []byte, minLength uint32, maxLength uint32) error
- func UnmarshalFloat[T float](dest *T, raw []byte, min T, max T, multipleOf T) error
- func UnmarshalFloatEnum[T float](dest *T, raw []byte, items ...T) error
- func UnmarshalInt[T integer](dest *T, raw []byte, min T, max T, multipleOf T) error
- func UnmarshalIntEnum[T integer](dest *T, raw []byte, items ...T) error
- func UnmarshalRequest[T any](dest *T, req *http.Request) error
- func UnmarshalString[T ~string](dest *T, raw []byte, minLength uint32, maxLength uint32, regex *regexp.Regexp) error
- func UnmarshalStringEnum[T ~string](dest *T, raw []byte, items ...T) error
- func UnmarshalStruct[T any](dest *T, raw []byte, extra *map[string]json.RawMessage) error
- func UnmarshalText(dest any, text []byte) error
- func UnmarshalUint[T uinteger](dest *T, raw []byte, min T, max T, multipleOf T) error
- func UnmarshalUintEnum[T uinteger](dest *T, raw []byte, items ...T) error
- type Bool
- type Date
- type DateTime
- type IPAddr
- type Path
- type PathError
- type PathErrors
- type PathIndex
- type PathItem
- type PathMember
- type SchemaTypeMapping
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArraySchema ¶
func ArraySchemaFor ¶
func EnumOptionsString ¶
func EnumSchema ¶
func EnumSchema[T comparable](items ...T) spec.Schema
func FloatSchema ¶
func MarshalArrayJSON ¶
func MarshalFloat ¶
func MarshalFloatEnum ¶
func MarshalInt ¶
func MarshalIntEnum ¶
func MarshalString ¶
func MarshalStringEnum ¶
func MarshalText ¶
func MarshalUint ¶
func MarshalUintEnum ¶
func ReflectRequest ¶
func ReflectRequest(t reflect.Type, param func(fld reflect.StructField, in spec.ParameterIn, name string), body func(fld reflect.StructField))
func StringSchema ¶
func StructSchemaFor ¶
func StructSchemaFor[T any](m SchemaTypeMapping) spec.Schema
func StructSchemaOf ¶
func StructSchemaOf(t reflect.Type, m SchemaTypeMapping) spec.Schema
func UintSchema ¶
func UnmarshalArrayJSON ¶
func UnmarshalArrayUniqueJSON ¶
func UnmarshalArrayUniqueJSON[T ~[]I, I comparable](dest *T, raw []byte, minLength uint32, maxLength uint32) error
func UnmarshalFloat ¶
func UnmarshalFloatEnum ¶
func UnmarshalInt ¶
func UnmarshalIntEnum ¶
func UnmarshalString ¶
func UnmarshalStringEnum ¶
func UnmarshalStruct ¶
func UnmarshalText ¶
func UnmarshalUint ¶
func UnmarshalUintEnum ¶
Types ¶
type Bool ¶
type Bool bool
func (Bool) MarshalJSON ¶
func (Bool) MarshalText ¶
func (*Bool) UnmarshalJSON ¶
func (*Bool) UnmarshalText ¶
type PathErrors ¶
type PathErrors []PathError
func NewPathErrors ¶
func NewPathErrors(item PathItem, err error) PathErrors
func (PathErrors) Error ¶
func (e PathErrors) Error() string
type PathMember ¶
type PathMember string
func (PathMember) String ¶
func (m PathMember) String() string
type SchemaTypeMapping ¶
type SchemaTypeMapping interface {
SchemaOrRefOf(t reflect.Type) spec.SchemaOrRef
}
Click to show internal directories.
Click to hide internal directories.