Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSchemaIncompatibleWithType = errors.New("schema is incompatible with type")
Functions ¶
This section is empty.
Types ¶
type TypeSchemaValidator ¶
type TypeSchemaValidator interface { // WithType immutably returns a new TypeSchemaValidator with the specified reflect.Type to validate. WithType(reflect.Type) TypeSchemaValidator // WithSchema immutably returns a new TypeSchemaValidator with the specified openapi3.Schema to validate. WithSchema(openapi3.Schema) TypeSchemaValidator // WithSchemaAndType immutably returns a new TypeSchemaValidator with the specified openapi3.Schema and reflect.Type to validate. WithSchemaAndType(openapi3.Schema, reflect.Type) TypeSchemaValidator // Validate reflect.Type and the openapi3.Schema compatibility using the validation Options. // Returns error with all compatability errors found or nil if compatible. Validate() error Errors() []string // contains filtered or unexported methods }
TypeSchemaValidator helps validate reflect.Type and openapi3.Schema compatibility using the validation Options.
func NewEmptyTypeSchemaValidator ¶
func NewEmptyTypeSchemaValidator() TypeSchemaValidator
NewEmptyTypeSchemaValidator returns a new TypeSchemaValidator that have no reflect.Type or openapi3.Schema configured yet.
func NewTypeSchemaValidator ¶
func NewTypeSchemaValidator(goType reflect.Type, schema openapi3.Schema) TypeSchemaValidator
NewTypeSchemaValidator returns a new TypeSchemaValidator that helps validate reflect.Type and openapi3.Schema compatibility using the validation Options.
Source Files ¶
- array_schema_validator.go
- assertions.go
- boolean_schema_validator.go
- error_messages.go
- integer_schema_validator.go
- multi_schemas_validator.go
- number_schema_validator.go
- object_schema_validator.go
- schema_allof_validator.go
- schema_format_validator.go
- schema_not_validator.go
- schema_validator.go
- string_schema_validator.go
Click to show internal directories.
Click to hide internal directories.