Rename emptyAPIServer to emptyServer
This commit is contained in:
parent
6feb27e7b2
commit
f5d9983381
7 changed files with 9 additions and 10 deletions
|
@ -221,7 +221,7 @@ api :: Proxy DocsAPI
|
|||
api = Proxy
|
||||
|
||||
server :: Server DocsAPI
|
||||
server = (Server.server3 :<|> emptyAPIServer) :<|> Tagged serveDocs where
|
||||
server = (Server.server3 :<|> emptyServer) :<|> Tagged serveDocs where
|
||||
serveDocs _ respond =
|
||||
respond $ responseLBS ok200 [plain] docsBS
|
||||
plain = ("Content-Type", "text/plain")
|
||||
|
|
|
@ -134,7 +134,7 @@ api' = Proxy
|
|||
server :: Server API
|
||||
server = randomPoint
|
||||
:<|> searchBook
|
||||
:<|> emptyAPIServer
|
||||
:<|> emptyServer
|
||||
|
||||
server' :: Server API'
|
||||
server' = server
|
||||
|
|
|
@ -1026,7 +1026,7 @@ TODO prose
|
|||
type CombinedAPI2 = API :<|> EmptyAPI
|
||||
|
||||
server11 :: Server CombinedAPI2
|
||||
server11 = server3 :<|> emptyAPIServer
|
||||
server11 = server3 :<|> emptyServer
|
||||
```
|
||||
|
||||
## Using another monad for your handlers
|
||||
|
|
|
@ -166,8 +166,7 @@ server = serve api (
|
|||
:<|> (\ a b c d -> return (a, b, c, d))
|
||||
:<|> (return $ addHeader 1729 $ addHeader "eg2" True)
|
||||
:<|> return NoContent
|
||||
:<|> emptyAPIServer
|
||||
)
|
||||
:<|> emptyServer)
|
||||
|
||||
|
||||
type FailApi =
|
||||
|
|
|
@ -18,7 +18,7 @@ module Servant.Server
|
|||
HasServer(..)
|
||||
, Server
|
||||
, EmptyServer
|
||||
, emptyAPIServer
|
||||
, emptyServer
|
||||
, Handler (..)
|
||||
, runHandler
|
||||
|
||||
|
|
|
@ -536,8 +536,8 @@ instance HasServer api context => HasServer (HttpVersion :> api) context where
|
|||
data EmptyServer = EmptyServer deriving (Typeable, Eq, Show, Bounded, Enum)
|
||||
|
||||
-- | Server for `EmptyAPI`
|
||||
emptyAPIServer :: Server EmptyAPI
|
||||
emptyAPIServer = Tagged EmptyServer
|
||||
emptyServer :: Server EmptyAPI
|
||||
emptyServer = Tagged EmptyServer
|
||||
|
||||
-- | The server for an `EmptyAPI` is `emptyAPIServer`.
|
||||
--
|
||||
|
|
|
@ -49,7 +49,7 @@ import Servant.API ((:<|>) (..), (:>), AuthProtect,
|
|||
import Servant.API.Internal.Test.ComprehensiveAPI
|
||||
import Servant.Server (Server, Handler, Tagged (..), err401, err403,
|
||||
err404, serve, serveWithContext,
|
||||
Context((:.), EmptyContext), emptyAPIServer)
|
||||
Context((:.), EmptyContext), emptyServer)
|
||||
import Test.Hspec (Spec, context, describe, it,
|
||||
shouldBe, shouldContain)
|
||||
import qualified Test.Hspec.Wai as THW
|
||||
|
@ -618,7 +618,7 @@ miscServ :: Server MiscCombinatorsAPI
|
|||
miscServ = versionHandler
|
||||
:<|> secureHandler
|
||||
:<|> hostHandler
|
||||
:<|> emptyAPIServer
|
||||
:<|> emptyServer
|
||||
|
||||
where versionHandler = return . show
|
||||
secureHandler Secure = return "secure"
|
||||
|
|
Loading…
Reference in a new issue