Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type InvalidSchema = NonEmpty (Maybe Text, Failure)
- type Invalid = NonEmpty Failure
- type Failure = Fail ValidatorChain
- data ValidatorChain
- = 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
- | RefLoop
- | Ref ValidatorChain
- | Enum
- | TypeValidator
- | AllOf ValidatorChain
- | AnyOf ValidatorChain
- | OneOfTooManySuccesses
- | OneOfNoSuccesses ValidatorChain
- | NotValidator
- maxE :: MaximumInvalid -> ValidatorChain
- minE :: MinimumInvalid -> ValidatorChain
- itemsE :: ItemsInvalid ValidatorChain -> ValidatorChain
- depsE :: DependencyInvalid ValidatorChain -> ValidatorChain
- propE :: PropertiesInvalid ValidatorChain -> ValidatorChain
- patPropE :: PatternPropertiesInvalid ValidatorChain -> ValidatorChain
- addPropE :: AdditionalPropertiesInvalid ValidatorChain -> ValidatorChain
- refE :: RefInvalid ValidatorChain -> ValidatorChain
- oneOfE :: OneOfInvalid ValidatorChain -> ValidatorChain
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.
type Failure = Fail ValidatorChain Source #
data ValidatorChain Source #
Distinguish all the different possible causes of failure for Draft 4 validation.
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 ValidatorChain | |
OneOfTooManySuccesses | |
OneOfNoSuccesses ValidatorChain | |
NotValidator |
maxE :: MaximumInvalid -> ValidatorChain Source #
minE :: MinimumInvalid -> ValidatorChain Source #