add Raw to ComprehensiveAPI (and add ComprehensiveAPIWithoutRaw)
This commit is contained in:
parent
f5efaf9416
commit
23493d982d
2 changed files with 10 additions and 4 deletions
|
@ -33,7 +33,7 @@ import Servant.JSSpec.CustomHeaders
|
||||||
-- * comprehensive api
|
-- * comprehensive api
|
||||||
|
|
||||||
-- This declaration simply checks that all instances are in place.
|
-- This declaration simply checks that all instances are in place.
|
||||||
_ = jsForAPI comprehensiveAPI vanillaJS :: Text
|
_ = jsForAPI comprehensiveAPIWithoutRaw vanillaJS :: Text
|
||||||
|
|
||||||
-- * specs
|
-- * specs
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,13 @@ import Servant.API
|
||||||
type GET = Get '[JSON] NoContent
|
type GET = Get '[JSON] NoContent
|
||||||
|
|
||||||
type ComprehensiveAPI =
|
type ComprehensiveAPI =
|
||||||
|
ComprehensiveAPIWithoutRaw :<|>
|
||||||
|
Raw
|
||||||
|
|
||||||
|
comprehensiveAPI :: Proxy ComprehensiveAPI
|
||||||
|
comprehensiveAPI = Proxy
|
||||||
|
|
||||||
|
type ComprehensiveAPIWithoutRaw =
|
||||||
GET :<|>
|
GET :<|>
|
||||||
Get '[JSON] Int :<|>
|
Get '[JSON] Int :<|>
|
||||||
Capture "foo" Int :> GET :<|>
|
Capture "foo" Int :> GET :<|>
|
||||||
|
@ -22,7 +29,6 @@ type ComprehensiveAPI =
|
||||||
QueryParam "foo" Int :> GET :<|>
|
QueryParam "foo" Int :> GET :<|>
|
||||||
QueryParams "foo" Int :> GET :<|>
|
QueryParams "foo" Int :> GET :<|>
|
||||||
QueryFlag "foo" :> GET :<|>
|
QueryFlag "foo" :> GET :<|>
|
||||||
-- Raw :<|>
|
|
||||||
RemoteHost :> GET :<|>
|
RemoteHost :> GET :<|>
|
||||||
ReqBody '[JSON] Int :> GET :<|>
|
ReqBody '[JSON] Int :> GET :<|>
|
||||||
Get '[JSON] (Headers '[Header "foo" Int] NoContent) :<|>
|
Get '[JSON] (Headers '[Header "foo" Int] NoContent) :<|>
|
||||||
|
@ -33,5 +39,5 @@ type ComprehensiveAPI =
|
||||||
WithNamedContext "foo" '[] GET :<|>
|
WithNamedContext "foo" '[] GET :<|>
|
||||||
CaptureAll "foo" Int :> GET
|
CaptureAll "foo" Int :> GET
|
||||||
|
|
||||||
comprehensiveAPI :: Proxy ComprehensiveAPI
|
comprehensiveAPIWithoutRaw :: Proxy ComprehensiveAPIWithoutRaw
|
||||||
comprehensiveAPI = Proxy
|
comprehensiveAPIWithoutRaw = Proxy
|
||||||
|
|
Loading…
Reference in a new issue