Versions in this module Expand all Collapse all v0 v0.27.3 Apr 19, 2026 Changes in this version + const ArrayDoesNotAllowAdditionalItemsError + const HasDependencyError + const InvalidTypeConversionError + const MustNotValidateSchemaError + const MustValidateAllSchemasError + const MustValidateAtLeastOneSchemaError + const MustValidateOnlyOneSchemaError + var Debug = os.Getenv("SWAGGER_DEBUG") != "" + func AgainstSchema(schema *spec.Schema, data interface{}, formats strfmt.Registry, ...) error + func Enum(path, in string, data interface{}, enum interface{}) *errors.Validation + func FormatOf(path, in, format, data string, registry strfmt.Registry) *errors.Validation + func IsValueValidAgainstRange(val interface{}, typeName, format, prefix, path string) error + func MaxItems(path, in string, size, max int64) *errors.Validation + func MaxLength(path, in, data string, maxLength int64) *errors.Validation + func Maximum(path, in string, data, max float64, exclusive bool) *errors.Validation + func MaximumInt(path, in string, data, max int64, exclusive bool) *errors.Validation + func MaximumNativeType(path, in string, val interface{}, max float64, exclusive bool) *errors.Validation + func MaximumUint(path, in string, data, max uint64, exclusive bool) *errors.Validation + func MinItems(path, in string, size, min int64) *errors.Validation + func MinLength(path, in, data string, minLength int64) *errors.Validation + func Minimum(path, in string, data, min float64, exclusive bool) *errors.Validation + func MinimumInt(path, in string, data, min int64, exclusive bool) *errors.Validation + func MinimumNativeType(path, in string, val interface{}, min float64, exclusive bool) *errors.Validation + func MinimumUint(path, in string, data, min uint64, exclusive bool) *errors.Validation + func MultipleOf(path, in string, data, factor float64) *errors.Validation + func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation + func MultipleOfNativeType(path, in string, val interface{}, multipleOf float64) *errors.Validation + func MultipleOfUint(path, in string, data, factor uint64) *errors.Validation + func Pattern(path, in, data, pattern string) *errors.Validation + func Required(path, in string, data interface{}) *errors.Validation + func SetContinueOnErrors(c bool) + func UniqueItems(path, in string, data interface{}) *errors.Validation + type Option func(*SchemaValidatorOptions) + type Opts struct + ContinueOnErrors bool + type Result struct + Errors []error + MatchCount int + Warnings []error + func (r *Result) AddErrors(errors ...error) + func (r *Result) AddWarnings(warnings ...error) + func (r *Result) AsError() error + func (r *Result) HasErrors() bool + func (r *Result) HasErrorsOrWarnings() bool + func (r *Result) HasWarnings() bool + func (r *Result) Inc() + func (r *Result) IsValid() bool + func (r *Result) Merge(others ...*Result) *Result + func (r *Result) MergeAsErrors(others ...*Result) *Result + func (r *Result) MergeAsWarnings(others ...*Result) *Result + type SchemaValidator struct + KnownFormats strfmt.Registry + Options SchemaValidatorOptions + Path string + Root interface{} + Schema *spec.Schema + func NewSchemaValidator(schema *spec.Schema, rootSchema interface{}, root string, ...) *SchemaValidator + func (s *SchemaValidator) Applies(source interface{}, kind reflect.Kind) bool + func (s *SchemaValidator) NewValidatorForField(field string, schema *spec.Schema, rootSchema interface{}, root string, ...) ValueValidator + func (s *SchemaValidator) NewValidatorForIndex(index int, schema *spec.Schema, rootSchema interface{}, root string, ...) ValueValidator + func (s *SchemaValidator) SetPath(path string) + func (s *SchemaValidator) Validate(data interface{}) *Result + type SchemaValidatorOptions struct + NewValidatorForField func(field string, schema *spec.Schema, rootSchema interface{}, root string, ...) ValueValidator + NewValidatorForIndex func(index int, schema *spec.Schema, rootSchema interface{}, root string, ...) ValueValidator + func (svo SchemaValidatorOptions) Options() []Option + type ValueValidator interface + Applies func(source interface{}, valueKind reflect.Kind) bool + SetPath func(path string) + Validate func(value interface{}) *Result