packages feed

servant-swagger 1.1 → 1.1.1

raw patch · 5 files changed

+16/−9 lines, 5 files

Files

CHANGELOG.md view
@@ -1,3 +1,10 @@+1.1.1+---++* Minor fixes:+  * Fix `unused-imports` and `unused-foralls` warnings;+  * Fix tests to match `swagger2-2.1.1` (add `example` property for `UTCTime` schema).+ 1.1 --- 
example/swagger.json view
@@ -31,6 +31,7 @@             }         },         "UTCTime": {+            "example": "2016-07-22T00:00:00Z",             "format": "yyyy-mm-ddThh:MM:ssZ",             "type": "string"         },
servant-swagger.cabal view
@@ -1,5 +1,5 @@ name:                servant-swagger-version:             1.1+version:             1.1.1 synopsis:            Generate Swagger specification for your servant API. description:         Please see README.md homepage:            https://github.com/haskell-servant/servant-swagger@@ -50,7 +50,7 @@                      , http-media                >=0.6.3    && <0.7                      , insert-ordered-containers >=0.1.0.0  && <0.2                      , lens                      >=4.7.0.1  && <4.15-                     , servant                   >=0.5      && <0.8+                     , servant                   >=0.5      && <0.9                      , swagger2                  >=2.1      && <2.2                      , text                      >=1.2.0.6  && <1.3                      , unordered-containers      >=0.2.5.1  && <0.3
src/Servant/Swagger/Internal.hs view
@@ -18,8 +18,6 @@  import Control.Lens import Data.Aeson-import Data.HashMap.Strict (HashMap)-import qualified Data.HashMap.Strict as HashMap import Data.Monoid import Data.Proxy import qualified Data.Swagger as Swagger@@ -84,10 +82,10 @@  -- | Make a singleton Swagger spec (with only one endpoint). -- For endpoints with no content see 'mkEndpointNoContent'.-mkEndpoint :: forall a cs hs proxy proxy' method status.+mkEndpoint :: forall a cs hs proxy method status.   (ToSchema a, AllAccept cs, AllToResponseHeader hs, SwaggerMethod method, KnownNat status)   => FilePath                                       -- ^ Endpoint path.-  -> proxy' (Verb method status cs (Headers hs a))  -- ^ Method, content-types, headers and response.+  -> proxy (Verb method status cs (Headers hs a))  -- ^ Method, content-types, headers and response.   -> Swagger mkEndpoint path proxy   = mkEndpointWithSchemaRef (Just ref) path proxy@@ -96,10 +94,10 @@     (defs, ref) = runDeclare (declareSchemaRef (Proxy :: Proxy a)) mempty  -- | Make a singletone 'Swagger' spec (with only one endpoint) and with no content schema.-mkEndpointNoContent :: forall nocontent cs hs proxy proxy' method status.+mkEndpointNoContent :: forall nocontent cs hs proxy method status.   (AllAccept cs, AllToResponseHeader hs, SwaggerMethod method, KnownNat status)   => FilePath                                               -- ^ Endpoint path.-  -> proxy' (Verb method status cs (Headers hs nocontent))  -- ^ Method, content-types, headers and response.+  -> proxy (Verb method status cs (Headers hs nocontent))  -- ^ Method, content-types, headers and response.   -> Swagger mkEndpointNoContent path proxy   = mkEndpointWithSchemaRef Nothing path proxy
test/Servant/SwaggerSpec.hs view
@@ -83,7 +83,8 @@       "UTCTime":         {           "type": "string",-          "format": "yyyy-mm-ddThh:MM:ssZ"+          "format": "yyyy-mm-ddThh:MM:ssZ",+          "example": "2016-07-22T00:00:00Z"         }     },   "paths":