hjsonschema-1.1.0.1: JSON Schema library

Safe HaskellNone
LanguageHaskell2010

Data.JsonSchema.Draft4.Failure

Synopsis

Documentation

type InvalidSchema = NonEmpty (Maybe Text, Failure) Source #

A description of why a schema (or one of its reference) is itself invalid.

Nothing indicates the starting schema. Just indicates a referenced schema -- the contents of the Just is the schema's URI.

NOTE: 'HashMap (Maybe Text) Invalid' would be a nicer way of defining this, but then we lose the guarantee that there's at least one key.

data ValidatorChain Source #

Distinguish all the different possible causes of failure for Draft 4 validation.

Constructors

MultipleOf 
Maximum 
ExclusiveMaximum 
Minimum 
ExclusiveMinimum 
MaxLength 
MinLength 
PatternValidator 
MaxItems 
MinItems 
UniqueItems 
Items ValidatorChain 
AdditionalItemsBool 
AdditionalItemsObject ValidatorChain 
MaxProperties 
MinProperties 
Required 
SchemaDependency ValidatorChain 
PropertyDependency 
Properties ValidatorChain 
PatternProperties ValidatorChain 
AdditionalPropertiesBool 
AdditionalPropertiesObject ValidatorChain 
RefResolution

Indicates a reference that failed to resolve.

NOTE: The language agnostic test suite doesn't specify if this should cause a validation error or should allow data to pass. We choose to return a validation error.

Also note that ideally we would enforce in the type system that any failing references be dealt with before valididation. Then this could be removed entirely.

RefLoop 
Ref ValidatorChain 
Enum 
TypeValidator 
AllOf ValidatorChain 
AnyOf 
OneOf 
NotValidator