Safe Haskell | None |
---|---|
Language | Haskell2010 |
- maxProperties :: Int -> HashMap Text Value -> Maybe (Fail ())
- minProperties :: Int -> HashMap Text Value -> Maybe (Fail ())
- newtype Required = Required {
- _unRequired :: Set Text
- required :: Required -> HashMap Text Value -> Maybe (Fail ())
- data Dependency schema
- = SchemaDependency schema
- | PropertyDependency (Set Text)
- data DependencyInvalid err
- dependencies :: forall err schema. (schema -> Value -> [Fail err]) -> HashMap Text (Dependency schema) -> HashMap Text Value -> [Fail (DependencyInvalid err)]
- newtype Remaining = Remaining {}
- data PropertiesInvalid err
- = PropertiesInvalid err
- | PropPatternInvalid err
- | PropAdditionalInvalid (AdditionalPropertiesInvalid err)
- properties :: forall err schema. (schema -> Value -> [Fail err]) -> Maybe (HashMap Text schema) -> Maybe (AdditionalProperties schema) -> HashMap Text schema -> HashMap Text Value -> [Fail (PropertiesInvalid err)]
- data PatternPropertiesInvalid err
- patternProperties :: forall err schema. (schema -> Value -> [Fail err]) -> Bool -> Maybe (AdditionalProperties schema) -> HashMap Text schema -> HashMap Text Value -> [Fail (PatternPropertiesInvalid err)]
- patternAndUnmatched :: forall err schema. (schema -> Value -> [Fail err]) -> HashMap Text schema -> HashMap Text Value -> ([Fail err], Remaining)
- data AdditionalProperties schema
- data AdditionalPropertiesInvalid err
- = APBoolInvalid
- | APObjectInvalid err
- additionalProperties :: forall err schema. (schema -> Value -> [Fail err]) -> Bool -> AdditionalProperties schema -> HashMap Text Value -> [Fail (AdditionalPropertiesInvalid err)]
- additionalPropertiesBool :: Bool -> HashMap Text Value -> [Fail ()]
- additionalPropertiesObject :: forall err schema. (schema -> Value -> [Fail err]) -> schema -> HashMap Text Value -> [Fail err]
maxProperties
maxProperties :: Int -> HashMap Text Value -> Maybe (Fail ()) Source #
The spec requires "maxProperties"
to be non-negative.
minProperties
minProperties :: Int -> HashMap Text Value -> Maybe (Fail ()) Source #
The spec requires "minProperties"
to be non-negative.
required
dependencies
data Dependency schema Source #
SchemaDependency schema | |
PropertyDependency (Set Text) |
Eq schema => Eq (Dependency schema) Source # | |
Show schema => Show (Dependency schema) Source # | |
Arbitrary schema => Arbitrary (Dependency schema) Source # | |
FromJSON schema => FromJSON (Dependency schema) Source # | |
ToJSON schema => ToJSON (Dependency schema) Source # | |
data DependencyInvalid err Source #
Eq err => Eq (DependencyInvalid err) Source # | |
Show err => Show (DependencyInvalid err) Source # | |
dependencies :: forall err schema. (schema -> Value -> [Fail err]) -> HashMap Text (Dependency schema) -> HashMap Text Value -> [Fail (DependencyInvalid err)] Source #
From the spec: http://json-schema.org/latest/json-schema-validation.html#anchor70
This keyword's value MUST be an object. Each value of this object MUST be either an object or an array. If the value is an object, it MUST be a valid JSON Schema. This is called a schema dependency. If the value is an array, it MUST have at least one element. Each element MUST be a string, and elements in the array MUST be unique. This is called a property dependency.
properties
data PropertiesInvalid err Source #
PropertiesInvalid err | |
PropPatternInvalid err | |
PropAdditionalInvalid (AdditionalPropertiesInvalid err) |
Eq err => Eq (PropertiesInvalid err) Source # | |
Show err => Show (PropertiesInvalid err) Source # | |
properties :: forall err schema. (schema -> Value -> [Fail err]) -> Maybe (HashMap Text schema) -> Maybe (AdditionalProperties schema) -> HashMap Text schema -> HashMap Text Value -> [Fail (PropertiesInvalid err)] Source #
In order of what's tried: "properties"
, "patternProperties"
,
"additionalProperties"
.
patternProperties
data PatternPropertiesInvalid err Source #
Eq err => Eq (PatternPropertiesInvalid err) Source # | |
Show err => Show (PatternPropertiesInvalid err) Source # | |
patternProperties :: forall err schema. (schema -> Value -> [Fail err]) -> Bool -> Maybe (AdditionalProperties schema) -> HashMap Text schema -> HashMap Text Value -> [Fail (PatternPropertiesInvalid err)] Source #
patternAndUnmatched :: forall err schema. (schema -> Value -> [Fail err]) -> HashMap Text schema -> HashMap Text Value -> ([Fail err], Remaining) Source #
additionalProperties
data AdditionalProperties schema Source #
Eq schema => Eq (AdditionalProperties schema) Source # | |
Show schema => Show (AdditionalProperties schema) Source # | |
Arbitrary schema => Arbitrary (AdditionalProperties schema) Source # | |
FromJSON schema => FromJSON (AdditionalProperties schema) Source # | |
ToJSON schema => ToJSON (AdditionalProperties schema) Source # | |
data AdditionalPropertiesInvalid err Source #
Eq err => Eq (AdditionalPropertiesInvalid err) Source # | |
Show err => Show (AdditionalPropertiesInvalid err) Source # | |
additionalProperties :: forall err schema. (schema -> Value -> [Fail err]) -> Bool -> AdditionalProperties schema -> HashMap Text Value -> [Fail (AdditionalPropertiesInvalid err)] Source #