git.iko.soy/typeable/servant
on master help sign in
remove serveDocumentation references/code
commit1631ae644cab55b8d296649caf9efe27146c19b5 authorJulian K. Arni <jkarni@gmail.com> dateWed 6 May 2015, 16:49 (11 years ago) parenta058cd4
2 files changed+1−29
servant-docs/src/Servant/Docs/Internal.hs−27 servant/src/Servant/API/Raw.hs+1−2
servant-docs/src/Servant/Docs/Internal.hs−27
@@ -876,30 +876,3 @@ instance (KnownSymbol path, HasDocs sublayout) => HasDocs (path :> sublayout) wh
876876 endpoint' = endpoint & path <>~ [symbolVal pa]
877877 pa = Proxy :: Proxy path
878878
879−{-
880−
881−-- | Serve your API's docs as markdown embedded in an html \<pre> tag.
882−--
883−-- > type MyApi = "users" :> Get [User]
884−-- > :<|> "docs :> Raw
885−-- >
886−-- > apiProxy :: Proxy MyApi
887−-- > apiProxy = Proxy
888−-- >
889−-- > server :: Server MyApi
890−-- > server = listUsers
891−-- > :<|> serveDocumentation apiProxy
892−serveDocumentation :: HasDocs api => Proxy api -> Server Raw
893−serveDocumentation proxy _request respond =
894− respond $ responseLBS ok200 [] $ cs $ toHtml $ markdown $ docs proxy
895−
896−toHtml :: String -> String
897−toHtml md =
898− "<html>" ++
899− "<body>" ++
900− "<pre>" ++
901− md ++
902− "</pre>" ++
903− "</body>" ++
904− "</html>"
905−-}
servant/src/Servant/API/Raw.hs+1−2
@@ -10,6 +10,5 @@ import Data.Typeable (Typeable)
1010--
1111-- In addition to just letting you plug in your existing WAI 'Application's,
1212-- this can also be used with 'Servant.Utils.StaticFiles.serveDirectory' to serve
13−-- static files stored in a particular directory on your filesystem, or to serve
14−-- your API's documentation with 'Servant.Utils.StaticFiles.serveDocumentation'.
13+-- static files stored in a particular directory on your filesystem
1514data Raw deriving Typeable