packages feed

rest-core 0.30.0.3 → 0.31

raw patch · 4 files changed

+17/−14 lines, 4 filesdep −containersdep ~eitherdep ~json-schema

Dependencies removed: containers

Dependency ranges changed: either, json-schema

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +### 0.31++* Schema: `action` has been renamed to `static` since it is tied to `statics` and to disambiguate it from the unrelated `actions`.+ #### 0.30.0.3  * Use `json-schema 0.5.*`
rest-core.cabal view
@@ -1,5 +1,5 @@ name:                rest-core-version:             0.30.0.3+version:             0.31 description:         Rest API library. synopsis:            Rest API library. maintainer:          code@silk.co@@ -42,13 +42,12 @@     , aeson >= 0.7 && < 0.8     , aeson-utils == 0.2.*     , bytestring >= 0.9 && < 0.11-    , containers >= 0.3 && < 0.6-    , either >= 3.4 && < 4.2+    , either >= 3.4 && < 4.4     , errors == 1.4.*     , fclabels == 2.0.*     , hxt >= 9.2 && < 9.4     , hxt-pickle-utils == 0.1.*-    , json-schema == 0.5.*+    , json-schema == 0.6.*     , mtl >= 2.0 && < 2.3     , multipart >= 0.1.1 && < 0.2     , random == 1.0.*
src/Rest/Driver/Perform.hs view
@@ -46,7 +46,7 @@ class (Applicative m, Monad m) => Rest m where   getHeader       :: String -> m (Maybe String)   getParameter    :: String -> m (Maybe String)-  getBody         :: m (UTF8.ByteString)+  getBody         :: m UTF8.ByteString   getMethod       :: m Rest.Method   getPaths        :: m [String]   lookupMimeType  :: String -> m (Maybe String)
src/Rest/Schema.hs view
@@ -2,8 +2,8 @@ -- | This module contains data types and combinators for defining a -- 'Schema' for your 'Resource'. A 'Schema' has three type parameters, -- specifying the identifiers for a single resource, a listing, and a--- top-level action. After routing, these identifiers will be passed--- to the 'Handler'.+-- top-level (static) action. After routing, these identifiers will be+-- passed to the 'Handler'. module Rest.Schema   ( -- * A set of combinators for creating schemas. @@ -13,7 +13,7 @@   , singleton     -- ** Named endpoints   , named-  , action+  , static   , single   , singleBy   , singleRead@@ -65,10 +65,10 @@ named :: [(String, Endpoint sid mid aid)] -> Step sid mid aid named = Named --- | An action endpoint.+-- | A top level action endpoint for this resource. -action :: aid -> Endpoint sid mid aid-action = Left+static :: aid -> Endpoint sid mid aid+static = Left  -- | A singleton resource endpoint. @@ -145,7 +145,7 @@  -- | A 'Schema' describes how (part of the) route to a resource looks, -- and returns an identifier for a single resource ('sid'), many--- resources ('mid') or an action ('aid').+-- resources ('mid') or a static action ('aid'). -- The first argument specifies the top level resource (no path -- segments). The second specifies a what happens at the first step in -- the path.@@ -154,7 +154,7 @@  -- | A step in the routing of a resource. A part of the uri either -- identifies a 'Named' resource, or an 'Unnamed' resource. Named--- resources can be actions ('Left') or one or many singletons or+-- resources can be static actions ('Left') or one or many singletons or -- by's.  data Step sid mid aid = Named   [(String, Endpoint sid mid aid)]@@ -176,6 +176,6 @@  data Id id = forall a. Id (Ident a) (a -> id) --- | A named endpoint: an action, a single item of many items.+-- | A named endpoint: an static action, a single item of many items.  type Endpoint sid mid aid = Either aid (Cardinality (Getter sid) (Getter mid))