@@ -1,52 +1,6 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE TypeOperators #-}
1+module Servant.API.Internal.Test.ComprehensiveAPI
2+ {-# DEPRECATED "Use Servant.TestComprehensiveAPI" #-}
3+ ( module Servant.Test.ComprehensiveAPI )
4+ where
35
4−-- | This is a module containing an API with all `Servant.API` combinators. It
5−-- is used for testing only (in particular, checking that instances exist for
6−-- the core servant classes for each combinator), and should not be imported.
7−module Servant.API.Internal.Test.ComprehensiveAPI where
8−
9−import Data.Proxy
10− (Proxy (..))
11−import Servant.API
12−import Servant.Types.SourceT
13− (SourceT)
14−
15−type GET = Get '[JSON] NoContent
16−
17−type ComprehensiveAPI =
18− ComprehensiveAPIWithoutRaw :<|>
19− Raw
20−
21−comprehensiveAPI :: Proxy ComprehensiveAPI
22−comprehensiveAPI = Proxy
23−
24−type ComprehensiveAPIWithoutRaw =
25− GET :<|>
26− Get '[JSON] Int :<|>
27− Capture' '[Description "example description"] "foo" Int :> GET :<|>
28− Header "foo" Int :> GET :<|>
29− Header' '[Required, Lenient] "bar" Int :> GET :<|>
30− HttpVersion :> GET :<|>
31− IsSecure :> GET :<|>
32− QueryParam "foo" Int :> GET :<|>
33− QueryParam' '[Required, Lenient] "bar" Int :> GET :<|>
34− QueryParams "foo" Int :> GET :<|>
35− QueryFlag "foo" :> GET :<|>
36− RemoteHost :> GET :<|>
37− ReqBody '[JSON] Int :> GET :<|>
38− ReqBody' '[Lenient] '[JSON] Int :> GET :<|>
39− Get '[JSON] (Headers '[Header "foo" Int] NoContent) :<|>
40− "foo" :> GET :<|>
41− Vault :> GET :<|>
42− Verb 'POST 204 '[JSON] NoContent :<|>
43− Verb 'POST 204 '[JSON] Int :<|>
44− StreamBody NetstringFraming JSON (SourceT IO Int) :> Stream 'GET 200 NetstringFraming JSON (SourceT IO Int) :<|>
45− WithNamedContext "foo" '[] GET :<|>
46− CaptureAll "foo" Int :> GET :<|>
47− Summary "foo" :> GET :<|>
48− Description "foo" :> GET :<|>
49− EmptyAPI
50−
51−comprehensiveAPIWithoutRaw :: Proxy ComprehensiveAPIWithoutRaw
52−comprehensiveAPIWithoutRaw = Proxy
6+import Servant.Test.ComprehensiveAPI