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: usizeThe 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: ErrorResults from a fancy_regex::Error::BacktrackLimitExceeded variant when matching
Constant
Fields
expected_value: ValueThe input value doesn’t match expected constant.
Contains
The input array doesn’t contain items conforming to the specified schema.
ContentEncoding
Fields
content_encoding: StringThe input value does not respect the defined contentEncoding
ContentMediaType
Fields
content_media_type: StringThe input value does not respect the defined contentMediaType
Enum
Fields
options: ValueThe input value doesn’t match any of specified options.
ExclusiveMaximum
Fields
limit: ValueValue is too large.
ExclusiveMinimum
Fields
limit: ValueValue is too small.
FalseSchema
Everything is invalid for false schema.
FileNotFound
Fields
error: ErrorIf the referenced file is not found during ref resolution.
Format
Fields
format: &'static strWhen the input doesn’t match to the specified format.
FromUtf8
Fields
error: FromUtf8ErrorMay happen in contentEncoding validation if base64 encoded data is invalid.
Utf8
Fields
error: Utf8ErrorInvalid UTF-8 string during percent encoding when resolving happens
JSONParse
Fields
error: ErrorMay happen during ref resolution when remote document is not a valid JSON.
InvalidReference
Fields
reference: Stringref value is not valid.
InvalidURL
Fields
error: ParseErrorInvalid URL, e.g. invalid port number or IP address
MaxItems
Fields
limit: u64Too many items in an array.
Maximum
Fields
limit: ValueValue is too large.
MaxLength
Fields
limit: u64String is too long.
MaxProperties
Fields
limit: u64Too many properties in an object.
MinItems
Fields
limit: u64Too few items in an array.
Minimum
Fields
limit: ValueValue is too small.
MinLength
Fields
limit: u64String is too short.
MinProperties
Fields
limit: u64Not enough properties in an object.
MultipleOf
Fields
multiple_of: f64When some number is not a multiple of another number.
Not
Fields
schema: ValueNegated 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: StringWhen the input doesn’t match to a pattern.
PropertyNames
Fields
error: Box<ValidationError<'static>>Object property names are invalid.
Required
Fields
property: ValueWhen a required property is missing.
Schema
Resolved schema failed to compile.
Type
Fields
kind: TypeKindWhen the input value doesn’t match one or multiple required types.
UniqueItems
When the input array has non-unique elements.
UnknownReferenceScheme
Fields
scheme: StringReference contains unknown scheme.
Resolver
Fields
url: UrlThe url that was tried to be resolved.
error: SchemaResolverErrorThe resolution error.
Error during schema ref resolution.