@@ -1,8 +1,8 @@
1-- | An implementation of JSON Schema Draft 4 based on 'HashMap Text Value'
1-- | An implementation of JSON Schema Draft 4 based on 'HashMap Text Value'
2−-- instead of a custom record type like 'Data.JsonSchema.Draft4'.
2+-- instead of a custom record type like 'JSONSchema.Draft4'.
4-- If you're writing code for a new schema specification you probably want
4-- If you're writing code for a new schema specification you probably want
5−-- to copy this module instead of the 'Data.JsonSchema.Draft4'. While it's
5+-- to copy this module instead of the 'JSONSchema.Draft4'. While it's
6-- less convenient to write schemas in Haskell without a record type, you
6-- less convenient to write schemas in Haskell without a record type, you
7-- can get the implementation finished with far fewer lines of code.
7-- can get the implementation finished with far fewer lines of code.
@@ -10,23 +10,23 @@ module AlternateSchema where
11import Protolude
11import Protolude
13−import Data.Aeson (FromJSON(..), Value(..),
13+import Data.Aeson (FromJSON(..), Value(..),
15−import qualified Data.Aeson as AE
15+import qualified Data.Aeson as AE
16−import qualified Data.ByteString.Lazy as LBS
16+import qualified Data.ByteString.Lazy as LBS
17−import qualified Data.HashMap.Strict as HM
17+import qualified Data.HashMap.Strict as HM
18−import Data.Maybe (fromMaybe)
18+import Data.Maybe (fromMaybe)
19−import Data.Profunctor (Profunctor (..))
19+import Data.Profunctor (Profunctor (..))
21−import Data.JsonSchema.Draft4 (ValidatorFailure(..),
21+import JSONSchema.Draft4 (ValidatorFailure(..),
22− metaSchemaBytes)
22+ metaSchemaBytes)
23−import Data.JsonSchema.Fetch (ReferencedSchemas(..),
23+import JSONSchema.Fetch (ReferencedSchemas(..),
24− SchemaWithURI(..))
24+ SchemaWithURI(..))
25−import qualified Data.JsonSchema.Fetch as FE
25+import qualified JSONSchema.Fetch as FE
26−import Data.JsonSchema.Types (Schema(..), Spec(..))
26+import JSONSchema.Types (Schema(..), Spec(..))
27−import qualified Data.JsonSchema.Types as JT
27+import qualified JSONSchema.Types as JT
28−import qualified Data.Validator.Draft4 as D4
28+import qualified JSONSchema.Validator.Draft4 as D4
29−import Data.Validator.Reference (updateResolutionScope)
29+import JSONSchema.Validator.Reference (updateResolutionScope)
31--------------------------------------------------
31--------------------------------------------------
32-- * Basic fetching tools
32-- * Basic fetching tools
@@ -107,7 +107,7 @@ d4Spec
107 -> Maybe Text
107 -> Maybe Text
108 -> Spec Schema ValidatorFailure
108 -> Spec Schema ValidatorFailure
109 -- ^ Here we reuses 'ValidatorFailure' from
109 -- ^ Here we reuses 'ValidatorFailure' from
110− -- 'Data.JsonSchema.Draft4.Failure'. If your validators have different
110+ -- 'JSONSchema.Draft4.Failure'. If your validators have different
111 -- failure possibilities you'll need to create your own validator
111 -- failure possibilities you'll need to create your own validator
112 -- failure type.
112 -- failure type.
113d4Spec referenced visited scope =
113d4Spec referenced visited scope =