hjsonschema-1.1.0.1: JSON Schema library

Safe HaskellNone
LanguageHaskell2010

Data.Validator.Draft4.Any

Contents

Synopsis

$ref

data RefInvalid err Source #

Constructors

RefResolution 
RefLoop 
RefInvalid err 

Instances

Eq err => Eq (RefInvalid err) Source # 

Methods

(==) :: RefInvalid err -> RefInvalid err -> Bool #

(/=) :: RefInvalid err -> RefInvalid err -> Bool #

Show err => Show (RefInvalid err) Source # 

Methods

showsPrec :: Int -> RefInvalid err -> ShowS #

show :: RefInvalid err -> String #

showList :: [RefInvalid err] -> ShowS #

ref :: forall err schema. (FromJSON schema, ToJSON schema) => VisitedSchemas -> Maybe Text -> (Maybe Text -> Maybe schema) -> (VisitedSchemas -> Maybe Text -> schema -> Value -> [Fail err]) -> Text -> Value -> [Fail (RefInvalid err)] Source #

enum

newtype EnumVal Source #

From the spec: http://json-schema.org/latest/json-schema-validation.html#anchor76

The value of this keyword MUST be an array.
This array MUST have at least one element.
Elements in the array MUST be unique.

NOTE: We don't enforce the uniqueness constraint in the haskell code, but we do in the FromJSON instance.

Constructors

EnumVal 

type

allOf

allOf :: (schema -> Value -> [Fail err]) -> NonEmpty schema -> Value -> [Fail err] Source #

anyOf

anyOf :: ToJSON schema => (schema -> Value -> [Fail err]) -> NonEmpty schema -> Value -> Maybe (Fail ()) Source #

oneOf

oneOf :: forall err schema. ToJSON schema => (schema -> Value -> [Fail err]) -> NonEmpty schema -> Value -> Maybe (Fail ()) Source #

not

notVal :: ToJSON schema => (schema -> Value -> [Fail err]) -> schema -> Value -> Maybe (Fail ()) Source #