packages feed

servant-queryparam-openapi3 (empty) → 1.0.0

raw patch · 2 files changed

+58/−0 lines, 2 filesdep +basedep +bytestringdep +openapi3

Dependencies added: base, bytestring, openapi3, servant, servant-openapi3, servant-queryparam-core, servant-server, text, warp

Files

+ servant-queryparam-openapi3.cabal view
@@ -0,0 +1,32 @@+cabal-version: 2.2+name:          servant-queryparam-openapi3+version:       1.0.0+maintainer:    Danila Danko <https://github.com/deemp>+author:        Kristof Bastiaensen+copyright:     Kristof Bastiaensen 2020+synopsis:+  Instances of classes from [openapi3](https://hackage.haskell.org/package/openapi3) for [servant-queryparam-server](https://hackage.haskell.org/package/servant-queryparam-server).++license:       BSD-3-Clause+build-type:    Simple+category:      Servant, Web++source-repository head+  type:     git+  location: https://github.com/deemp/servant-queryparam++library+  default-language: GHC2021+  ghc-options:      -Wall+  exposed-modules:  Servant.OpenApi.Record+  hs-source-dirs:   src+  build-depends:+    , base                     >=4.16  && <5+    , bytestring+    , openapi3+    , servant                  >=0.19+    , servant-openapi3+    , servant-queryparam-core  >=1.0.0+    , servant-server           >=0.19+    , text+    , warp
+ src/Servant/OpenApi/Record.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GADTs #-}+{-# LANGUAGE InstanceSigs #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE UndecidableInstances #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}++-- | This module exports orphan instances to make+-- [@servant-queryparam-core@](https://hackage.haskell.org/package/servant-queryparam-core) work with [@servant-openapi3@](https://hackage.haskell.org/package/servant-openapi3).+module Servant.OpenApi.Record () where++import Data.OpenApi+import Data.Proxy+import Servant.API+import Servant.OpenApi+import Servant.Record++instance HasOpenApi (UnRecordParam mod (RecordParam mod a :> api)) => HasOpenApi (RecordParam mod a :> api) where+  toOpenApi :: Proxy (RecordParam mod a :> api) -> OpenApi+  toOpenApi _ = toOpenApi (Proxy :: Proxy (UnRecordParam mod (RecordParam mod a :> api)))