From 6a626cdecd5f8e34a7c3e03e310ff58a774246ae Mon Sep 17 00:00:00 2001 From: aaron levin Date: Sun, 13 Sep 2015 23:36:15 +0200 Subject: [PATCH] Remove client-specific data from AuthInfo --- servant-docs/src/Servant/Docs/Internal.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/servant-docs/src/Servant/Docs/Internal.hs b/servant-docs/src/Servant/Docs/Internal.hs index 8d87f6c1..444ace50 100644 --- a/servant-docs/src/Servant/Docs/Internal.hs +++ b/servant-docs/src/Servant/Docs/Internal.hs @@ -82,8 +82,8 @@ instance Hashable Method -- POST /foo -- @ data Endpoint = Endpoint - { _path :: [String] -- type collected - , _method :: Method -- type collected + { _path :: [String] -- type collected + , _method :: Method -- type collected } deriving (Eq, Ord, Generic) instance Show Endpoint where @@ -240,7 +240,6 @@ defResponse = Response data AuthenticationInfo = AuthenticationInfo { _authIntro :: String , _authDataRequired :: String - , _authUserReturned :: String } deriving (Eq, Ord, Show) -- | A datatype that represents everything that can happen @@ -598,10 +597,13 @@ markdown api = unlines $ authStr Nothing = [] authStr (Just auth) = "#### Authentication" : - "This endpoint is protected." : + "" : auth ^. authIntro : - "Data to supply" : + "" : + "Clients must supply the following data" : + "" : auth ^. authDataRequired : + "" : [] capturesStr :: [DocCapture] -> [String]