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 :<|>