Enum jsonschema::error::ValidationErrorKind
source · [−]pub enum ValidationErrorKind {
Show 39 variants
AdditionalItems {
limit: usize,
},
AdditionalProperties {
unexpected: Vec<String>,
},
AnyOf,
BacktrackLimitExceeded {
error: Error,
},
Constant {
expected_value: Value,
},
Contains,
ContentEncoding {
content_encoding: String,
},
ContentMediaType {
content_media_type: String,
},
Enum {
options: Value,
},
ExclusiveMaximum {
limit: Value,
},
ExclusiveMinimum {
limit: Value,
},
FalseSchema,
FileNotFound {
error: Error,
},
Format {
format: &'static str,
},
FromUtf8 {
error: FromUtf8Error,
},
Utf8 {
error: Utf8Error,
},
JSONParse {
error: Error,
},
InvalidReference {
reference: String,
},
InvalidURL {
error: ParseError,
},
MaxItems {
limit: u64,
},
Maximum {
limit: Value,
},
MaxLength {
limit: u64,
},
MaxProperties {
limit: u64,
},
MinItems {
limit: u64,
},
Minimum {
limit: Value,
},
MinLength {
limit: u64,
},
MinProperties {
limit: u64,
},
MultipleOf {
multiple_of: f64,
},
Not {
schema: Value,
},
OneOfMultipleValid,
OneOfNotValid,
Pattern {
pattern: String,
},
PropertyNames {
error: Box<ValidationError<'static>>,
},
Required {
property: Value,
},
Schema,
Type {
kind: TypeKind,
},
UniqueItems,
UnknownReferenceScheme {
scheme: String,
},
Resolver {
url: Url,
error: SchemaResolverError,
},
}
Expand description
Kinds of errors that may happen during validation
Variants
AdditionalItems
Fields
limit: usize
The input array contain more items than expected.
AdditionalProperties
Unexpected properties.
AnyOf
The input value is not valid under any of the given schemas.
BacktrackLimitExceeded
Fields
error: Error
Results from a fancy_regex::Error::BacktrackLimitExceeded
variant when matching
Constant
Fields
expected_value: Value
The input value doesn’t match expected constant.
Contains
The input array doesn’t contain items conforming to the specified schema.
ContentEncoding
Fields
content_encoding: String
The input value does not respect the defined contentEncoding
ContentMediaType
Fields
content_media_type: String
The input value does not respect the defined contentMediaType
Enum
Fields
options: Value
The input value doesn’t match any of specified options.
ExclusiveMaximum
Fields
limit: Value
Value is too large.
ExclusiveMinimum
Fields
limit: Value
Value is too small.
FalseSchema
Everything is invalid for false
schema.
FileNotFound
Fields
error: Error
If the referenced file is not found during ref resolution.
Format
Fields
format: &'static str
When the input doesn’t match to the specified format.
FromUtf8
Fields
error: FromUtf8Error
May happen in contentEncoding
validation if base64
encoded data is invalid.
Utf8
Fields
error: Utf8Error
Invalid UTF-8 string during percent encoding when resolving happens
JSONParse
Fields
error: Error
May happen during ref resolution when remote document is not a valid JSON.
InvalidReference
Fields
reference: String
ref
value is not valid.
InvalidURL
Fields
error: ParseError
Invalid URL, e.g. invalid port number or IP address
MaxItems
Fields
limit: u64
Too many items in an array.
Maximum
Fields
limit: Value
Value is too large.
MaxLength
Fields
limit: u64
String is too long.
MaxProperties
Fields
limit: u64
Too many properties in an object.
MinItems
Fields
limit: u64
Too few items in an array.
Minimum
Fields
limit: Value
Value is too small.
MinLength
Fields
limit: u64
String is too short.
MinProperties
Fields
limit: u64
Not enough properties in an object.
MultipleOf
Fields
multiple_of: f64
When some number is not a multiple of another number.
Not
Fields
schema: Value
Negated schema failed validation.
OneOfMultipleValid
The given schema is valid under more than one of the given schemas.
OneOfNotValid
The given schema is not valid under any on the given schemas.
Pattern
Fields
pattern: String
When the input doesn’t match to a pattern.
PropertyNames
Fields
error: Box<ValidationError<'static>>
Object property names are invalid.
Required
Fields
property: Value
When a required property is missing.
Schema
Resolved schema failed to compile.
Type
Fields
kind: TypeKind
When the input value doesn’t match one or multiple required types.
UniqueItems
When the input array has non-unique elements.
UnknownReferenceScheme
Fields
scheme: String
Reference contains unknown scheme.
Resolver
Fields
url: Url
The url that was tried to be resolved.
error: SchemaResolverError
The resolution error.
Error during schema ref resolution.