on master help sign in
add Raw to ComprehensiveAPI (and add ComprehensiveAPIWithoutRaw)
commit23493d982d0ec591f115bc4a0414fbc0dd7b61e7 authorSönke Hahn <soenkehahn@gmail.com> dateWed 17 Aug 2016, 15:51 (10 years ago) parentf5efaf9
2 files changed+10−4
servant-js/test/Servant/JSSpec.hs+1−1 servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs+9−3
servant-js/test/Servant/JSSpec.hs+1−1
@@ -33,7 +33,7 @@ import Servant.JSSpec.CustomHeaders
3333-- * comprehensive api
3434
3535-- This declaration simply checks that all instances are in place.
36−_ = jsForAPI comprehensiveAPI vanillaJS :: Text
36+_ = jsForAPI comprehensiveAPIWithoutRaw vanillaJS :: Text
3737
3838-- * specs
3939
servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs+9−3
@@ -13,6 +13,13 @@ import Servant.API
1313type GET = Get '[JSON] NoContent
1414
1515type ComprehensiveAPI =
16+ ComprehensiveAPIWithoutRaw :<|>
17+ Raw
18+
19+comprehensiveAPI :: Proxy ComprehensiveAPI
20+comprehensiveAPI = Proxy
21+
22+type ComprehensiveAPIWithoutRaw =
1623 GET :<|>
1724 Get '[JSON] Int :<|>
1825 Capture "foo" Int :> GET :<|>
@@ -22,7 +29,6 @@ type ComprehensiveAPI =
2229 QueryParam "foo" Int :> GET :<|>
2330 QueryParams "foo" Int :> GET :<|>
2431 QueryFlag "foo" :> GET :<|>
25−-- Raw :<|>
2632 RemoteHost :> GET :<|>
2733 ReqBody '[JSON] Int :> GET :<|>
2834 Get '[JSON] (Headers '[Header "foo" Int] NoContent) :<|>
@@ -33,5 +39,5 @@ type ComprehensiveAPI =
3339 WithNamedContext "foo" '[] GET :<|>
3440 CaptureAll "foo" Int :> GET
3541
36−comprehensiveAPI :: Proxy ComprehensiveAPI
37−comprehensiveAPI = Proxy
42+comprehensiveAPIWithoutRaw :: Proxy ComprehensiveAPIWithoutRaw
43+comprehensiveAPIWithoutRaw = Proxy