ComprehensiveAPI: add some comments (and minor tweaks)
This commit is contained in:
parent
14aac5fc9f
commit
ac930ef198
6 changed files with 10 additions and 2 deletions
|
@ -53,6 +53,7 @@ import Servant.API.Internal.Test.ComprehensiveAPI
|
||||||
import Servant.Client
|
import Servant.Client
|
||||||
import Servant.Server
|
import Servant.Server
|
||||||
|
|
||||||
|
-- This declaration simply checks that all instances are in place.
|
||||||
_ = client comprehensiveAPI
|
_ = client comprehensiveAPI
|
||||||
|
|
||||||
spec :: Spec
|
spec :: Spec
|
||||||
|
|
|
@ -23,6 +23,7 @@ import Servant.Docs.Internal
|
||||||
|
|
||||||
-- * comprehensive api
|
-- * comprehensive api
|
||||||
|
|
||||||
|
-- This declaration simply checks that all instances are in place.
|
||||||
_ = docs comprehensiveAPI
|
_ = docs comprehensiveAPI
|
||||||
|
|
||||||
instance ToParam (QueryParam "foo" Int) where
|
instance ToParam (QueryParam "foo" Int) where
|
||||||
|
|
|
@ -32,7 +32,8 @@ import Servant.JSSpec.CustomHeaders
|
||||||
|
|
||||||
-- * comprehensive api
|
-- * comprehensive api
|
||||||
|
|
||||||
_ = (jsForAPI comprehensiveAPI vanillaJS :: Text)
|
-- This declaration simply checks that all instances are in place.
|
||||||
|
_ = jsForAPI comprehensiveAPI vanillaJS :: Text
|
||||||
|
|
||||||
-- * specs
|
-- * specs
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ import Servant
|
||||||
import Servant.API.Internal.Test.ComprehensiveAPI
|
import Servant.API.Internal.Test.ComprehensiveAPI
|
||||||
import Servant.Mock
|
import Servant.Mock
|
||||||
|
|
||||||
|
-- This declaration simply checks that all instances are in place.
|
||||||
_ = mock comprehensiveAPI
|
_ = mock comprehensiveAPI
|
||||||
|
|
||||||
data Body
|
data Body
|
||||||
|
|
|
@ -63,7 +63,8 @@ import Servant.Server.Internal.Router
|
||||||
|
|
||||||
-- * comprehensive api test
|
-- * comprehensive api test
|
||||||
|
|
||||||
_ = serve comprehensiveAPI (error "unused") (error "unused")
|
-- This declaration simply checks that all instances are in place.
|
||||||
|
_ = serve comprehensiveAPI
|
||||||
|
|
||||||
-- * Specs
|
-- * Specs
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{-# LANGUAGE DataKinds #-}
|
{-# LANGUAGE DataKinds #-}
|
||||||
{-# LANGUAGE TypeOperators #-}
|
{-# LANGUAGE TypeOperators #-}
|
||||||
|
|
||||||
|
-- | This is a module containing an API with all `Servant.API` combinators. It
|
||||||
|
-- is used for testing only (in particular, checking that instances exist for
|
||||||
|
-- the core servant classes for each combinator), and should not be imported.
|
||||||
module Servant.API.Internal.Test.ComprehensiveAPI where
|
module Servant.API.Internal.Test.ComprehensiveAPI where
|
||||||
|
|
||||||
import Data.Proxy
|
import Data.Proxy
|
||||||
|
|
Loading…
Add table
Reference in a new issue