From 8b3bfd108a637bb75165c97c94a8da031b27522f Mon Sep 17 00:00:00 2001 From: Mario Rogic Date: Sun, 5 Jun 2016 19:34:29 +0200 Subject: [PATCH] WIP --- servant-docs/src/Servant/Docs/Internal.hs | 4 ++++ servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs | 1 + 2 files changed, 5 insertions(+) diff --git a/servant-docs/src/Servant/Docs/Internal.hs b/servant-docs/src/Servant/Docs/Internal.hs index 2d0cf673..91b1f165 100644 --- a/servant-docs/src/Servant/Docs/Internal.hs +++ b/servant-docs/src/Servant/Docs/Internal.hs @@ -517,6 +517,10 @@ class ToCapture c where class ToAuthInfo a where toAuthInfo :: Proxy a -> DocAuthentication +instance ToAuthInfo (BasicAuth "foo-realm" ()) where + toAuthInfo _ = DocAuthentication "herp" "derp" + + -- | Generate documentation in Markdown format for -- the given 'API'. markdown :: API -> String diff --git a/servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs b/servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs index 91d01727..f26cde28 100644 --- a/servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs +++ b/servant/src/Servant/API/Internal/Test/ComprehensiveAPI.hs @@ -22,6 +22,7 @@ type ComprehensiveAPI = QueryParam "foo" Int :> GET :<|> QueryParams "foo" Int :> GET :<|> QueryFlag "foo" :> GET :<|> + "private" :> BasicAuth "foo-realm" () :> GET :<|> -- Raw :<|> RemoteHost :> GET :<|> ReqBody '[JSON] Int :> GET :<|>