@@ -38,9 +38,10 @@ Like client function generation, documentation generation amounts to inspecting
3838This time however, we have to assist **servant**. While it is able to deduce a lot of things about our API, it can't magically come up with descriptions of the various pieces of our APIs that are human-friendly and explain what's going on "at the business-logic level". A good example to study for documentation generation is our webservice with the `/position`, `/hello` and `/marketing` endpoints from earlier:
3939
4040``` haskell
41−type ExampleAPI = "position" :> Capture "x" Int :> Capture "y" Int :> Get '[JSON] Position
41+type ExampleAPI = ("position" :> Capture "x" Int :> Capture "y" Int :> Get '[JSON] Position
4242 :<|> "hello" :> QueryParam "name" String :> Get '[JSON] HelloMessage
43− :<|> "marketing" :> ReqBody '[JSON] ClientInfo :> Post '[JSON] Email
43+ :<|> "marketing" :> ReqBody '[JSON] ClientInfo :> Post '[JSON] Email)
44+ :<|> EmptyAPI
4445
4546exampleAPI :: Proxy ExampleAPI
4647exampleAPI = Proxy
@@ -220,7 +221,7 @@ api :: Proxy DocsAPI
220221api = Proxy
221222
222223server :: Server DocsAPI
223−server = Server.server3 :<|> Tagged serveDocs where
224+server = (Server.server3 :<|> emptyAPIServer) :<|> Tagged serveDocs where
224225 serveDocs _ respond =
225226 respond $ responseLBS ok200 [plain] docsBS
226227 plain = ("Content-Type", "text/plain")