Versions in this module Expand all Collapse all v2 v2.0.2 Jan 29, 2024 v2.0.1 Jan 29, 2024 Changes in this version + func TopLevelType(schema string) (jsonparser.ValueType, error) + type Any struct + func NewAny() Any + func (a Any) Kind() Kind + type Array struct + Defs map[string]JsonSchema + Items JsonSchema + MinItems *int + Type []string + func NewArray(itemSchema JsonSchema, nonNull bool) Array + func (Array) Kind() Kind + type Boolean struct + Type []string + func NewBoolean(nonNull bool) Boolean + func (Boolean) Kind() Kind + type ID struct + Type []string + func NewID(nonNull bool) ID + func (ID) Kind() Kind + type Integer struct + Type []string + func NewInteger(nonNull bool) Integer + func (Integer) Kind() Kind + type JsonSchema interface + Kind func() Kind + func FromTypeRef(operation, definition *ast.Document, typeRef int, opts ...Option) JsonSchema + type Kind int + const AnyKind + const ArrayKind + const BooleanKind + const IDKind + const IntegerKind + const NumberKind + const ObjectKind + const RefKind + const StringKind + type Number struct + Type []string + func NewNumber(nonNull bool) Number + func (Number) Kind() Kind + type Object struct + AdditionalProperties bool + Defs map[string]JsonSchema + Properties map[string]JsonSchema + Required []string + Type []string + func NewObject(nonNull bool) Object + func NewObjectAny(nonNull bool) Object + func (Object) Kind() Kind + type Option func(opts *options) + func WithOverrides(overrides map[string]JsonSchema) Option + func WithPath(path []string) Option + type Ref struct + Ref string + func NewRef(definitionName string) Ref + func (Ref) Kind() Kind + type String struct + Type []string + func NewString(nonNull bool) String + func (String) Kind() Kind + type Validator struct + func MustNewValidatorFromSchema(schema JsonSchema) *Validator + func MustNewValidatorFromString(schema string) *Validator + func NewValidatorFromSchema(schema JsonSchema) (*Validator, error) + func NewValidatorFromString(schema string) (*Validator, error) + func (v *Validator) Validate(ctx context.Context, inputJSON []byte) error