rest-types 1.10.0.2 → 1.10.0.3
raw patch · 4 files changed
+14/−8 lines, 4 filesdep ~json-schemaPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: json-schema
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- rest-types.cabal +2/−2
- src/Rest/Types/Container.hs +5/−4
- src/Rest/Types/Error.hs +3/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +#### 1.10.0.3++* Use `JSONSchema` `Any` type instead of `Choice []`+ #### 1.10.0.2 * Use `rest-stringmap == 0.2.*`
rest-types.cabal view
@@ -1,5 +1,5 @@ name: rest-types-version: 1.10.0.2+version: 1.10.0.3 description: Silk Rest Framework Types synopsis: Silk Rest Framework Types maintainer: code@silk.co@@ -32,7 +32,7 @@ , containers >= 0.4 && < 0.6 , generic-aeson == 0.1.* , hxt >= 9.2 && < 9.4- , json-schema == 0.4.*+ , json-schema == 0.5.* , mtl >= 2.0 && < 2.3 , regular == 0.3.* , regular-xmlpickler == 0.2.*
src/Rest/Types/Container.hs view
@@ -21,7 +21,7 @@ import Prelude hiding (mapM) import Data.Aeson.Types-import Data.JSON.Schema hiding (Object, Value)+import Data.JSON.Schema (JSONSchema (..), gSchema) import Data.Typeable import GHC.Generics import Generics.Generic.Aeson@@ -30,6 +30,7 @@ import Text.XML.HXT.Arrow.Pickle import Text.XML.HXT.Arrow.Pickle.Schema import Text.XML.HXT.Arrow.Pickle.Xml+import qualified Data.JSON.Schema as JSONSchema ------------------------------------------------------------------------------- @@ -60,8 +61,8 @@ (throwMsg "Cannot unpickle SomeOutput.") Any -instance ToJSON SomeOutput where toJSON (SomeOutput r) = toJSON r--- readJSON _ = Error "Cannot read SomeOutput from JSON."+instance ToJSON SomeOutput where+ toJSON (SomeOutput r) = toJSON r instance JSONSchema SomeOutput where- schema _ = Choice [] -- TODO: should be something like Any+ schema _ = JSONSchema.Any
src/Rest/Types/Error.hs view
@@ -21,7 +21,7 @@ import Control.Monad.Error import Data.Aeson hiding (Success)-import Data.JSON.Schema+import Data.JSON.Schema (JSONSchema (..), gSchema) import Data.Typeable import GHC.Generics import Generics.Generic.Aeson@@ -30,6 +30,7 @@ import Text.XML.HXT.Arrow.Pickle import Text.XML.HXT.Arrow.Pickle.Schema import Text.XML.HXT.Arrow.Pickle.Xml+import qualified Data.JSON.Schema as JSONSchema -- Error utilities. @@ -141,4 +142,4 @@ instance ToJSON SomeReason where toJSON (SomeReason r) = toJSON r instance JSONSchema SomeReason where- schema _ = Choice [] -- TODO: this should be something like Any+ schema _ = JSONSchema.Any