git.iko.soy/typeable/swagger2
on master help sign in
ToParamSchema instance for SetCookie
commitf37ffaf78b577d1f2d3dcd64df99d6c115d9fd8e authorDomen Kožar <domen@dev.si> dateSun 4 Nov 2018, 18:20 (8 years ago) parent151331d
2 files changed+8
src/Data/Swagger/Internal/ParamSchema.hs+6 swagger2.cabal+2
src/Data/Swagger/Internal/ParamSchema.hs+6
@@ -43,6 +43,7 @@ import Data.Version (Version)
4343import Numeric.Natural.Compat (Natural)
4444import Data.Word
4545import Data.UUID.Types (UUID)
46+import Web.Cookie (SetCookie)
4647
4748import Data.Swagger.Internal
4849import Data.Swagger.Lens
@@ -224,6 +225,11 @@ instance ToParamSchema Version where
224225 & type_ .~ SwaggerString
225226 & pattern ?~ "^\\d+(\\.\\d+)*$"
226227
228+instance ToParamSchema SetCookie where
229+ toParamSchema _ = mempty
230+ & type_ .~ SwaggerString
231+
232+
227233#if __GLASGOW_HASKELL__ < 800
228234#else
229235type family ToParamSchemaByteStringError bs where
swagger2.cabal+2
@@ -76,6 +76,8 @@ library
7676 build-depends:
7777 base-compat-batteries >=0.10.4 && <0.11
7878 , aeson >=1.3.1.1 && <1.5
79+ -- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
80+ , cookie >=0.4.3 && <0.5
7981 , generics-sop >=0.3.2.0 && <0.5
8082 , hashable >=1.2.7.0 && <1.3
8183 , http-media >=0.7.1.2 && <0.8