Skip to content

Commit

Permalink
Merge pull request #173 from domenkozar/cookie
Browse files Browse the repository at this point in the history
ToParamSchema instance for SetCookie
  • Loading branch information
phadej committed Nov 9, 2018
2 parents 151331d + f37ffaf commit bc29356
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Data/Swagger/Internal/ParamSchema.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import Data.Version (Version)
import Numeric.Natural.Compat (Natural)
import Data.Word
import Data.UUID.Types (UUID)
import Web.Cookie (SetCookie)

import Data.Swagger.Internal
import Data.Swagger.Lens
Expand Down Expand Up @@ -224,6 +225,11 @@ instance ToParamSchema Version where
& type_ .~ SwaggerString
& pattern ?~ "^\\d+(\\.\\d+)*$"

instance ToParamSchema SetCookie where
toParamSchema _ = mempty
& type_ .~ SwaggerString


#if __GLASGOW_HASKELL__ < 800
#else
type family ToParamSchemaByteStringError bs where
Expand Down
2 changes: 2 additions & 0 deletions swagger2.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ library
build-depends:
base-compat-batteries >=0.10.4 && <0.11
, aeson >=1.3.1.1 && <1.5
-- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
, cookie >=0.4.3 && <0.5
, generics-sop >=0.3.2.0 && <0.5
, hashable >=1.2.7.0 && <1.3
, http-media >=0.7.1.2 && <0.8
Expand Down

0 comments on commit bc29356

Please sign in to comment.