| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.JsonSchema.Draft4.Internal
Contents
- embedded :: Schema -> [Schema]
- runValidate :: SchemaCache Schema -> SchemaContext Schema -> Value -> [Failure]
- validateAny :: SchemaCache Schema -> SchemaContext Schema -> Value -> [Failure ValidatorChain]
- validateString :: Schema -> Text -> [Failure ValidatorChain]
- validateNumber :: Schema -> Scientific -> [Failure ValidatorChain]
- validateArray :: SchemaCache Schema -> SchemaContext Schema -> Vector Value -> [Failure ValidatorChain]
- validateObject :: SchemaCache Schema -> SchemaContext Schema -> HashMap Text Value -> [Failure ValidatorChain]
- descendNextLevel :: SchemaCache Schema -> SchemaContext Schema -> Schema -> Value -> [Failure ValidatorChain]
- runSingle :: Schema -> dta -> (Schema -> Maybe val) -> (err -> Failure ValidatorChain) -> (val -> dta -> [err]) -> [Failure ValidatorChain]
Embedded Schemas
embedded :: Schema -> [Schema] Source
Return a schema's immediate subschemas.
Pass this to fetchReferencedSchemas so that function can find all the
subschemas in a document. This allows fetchReferencedSchemas to process
only "$ref"s and "id"s that are actual schema keywords. For example,
within a "properties" validator object an "id" key doesn't actually change
any scope, but instead serves a validator-specific function.
Validation (Exported from Draft4)
runValidate :: SchemaCache Schema -> SchemaContext Schema -> Value -> [Failure] Source
In normal situations just use checkSchema, which is a combination of
schemaValidity and runValidate.
Validation (Main internal functions)
validateAny :: SchemaCache Schema -> SchemaContext Schema -> Value -> [Failure ValidatorChain] Source
validateString :: Schema -> Text -> [Failure ValidatorChain] Source
validateNumber :: Schema -> Scientific -> [Failure ValidatorChain] Source
validateArray :: SchemaCache Schema -> SchemaContext Schema -> Vector Value -> [Failure ValidatorChain] Source
validateObject :: SchemaCache Schema -> SchemaContext Schema -> HashMap Text Value -> [Failure ValidatorChain] Source
Validation (Internal utils)
descendNextLevel :: SchemaCache Schema -> SchemaContext Schema -> Schema -> Value -> [Failure ValidatorChain] Source
runSingle :: Schema -> dta -> (Schema -> Maybe val) -> (err -> Failure ValidatorChain) -> (val -> dta -> [err]) -> [Failure ValidatorChain] Source