Add support for NamedRoutes in servant-docs
This commit is contained in:
parent
117a2cc5e1
commit
9c81b4927a
1 changed files with 4 additions and 0 deletions
|
@ -62,6 +62,7 @@ import GHC.TypeLits
|
||||||
import Servant.API
|
import Servant.API
|
||||||
import Servant.API.ContentTypes
|
import Servant.API.ContentTypes
|
||||||
import Servant.API.TypeLevel
|
import Servant.API.TypeLevel
|
||||||
|
import Servant.API.Generic
|
||||||
|
|
||||||
import qualified Data.Universe.Helpers as U
|
import qualified Data.Universe.Helpers as U
|
||||||
|
|
||||||
|
@ -1150,6 +1151,9 @@ instance (ToAuthInfo (BasicAuth realm usr), HasDocs api) => HasDocs (BasicAuth r
|
||||||
authProxy = Proxy :: Proxy (BasicAuth realm usr)
|
authProxy = Proxy :: Proxy (BasicAuth realm usr)
|
||||||
action' = over authInfo (|> toAuthInfo authProxy) action
|
action' = over authInfo (|> toAuthInfo authProxy) action
|
||||||
|
|
||||||
|
instance HasDocs (ToServantApi api) => HasDocs (NamedRoutes api) where
|
||||||
|
docsFor Proxy = docsFor (Proxy :: Proxy (ToServantApi api))
|
||||||
|
|
||||||
-- ToSample instances for simple types
|
-- ToSample instances for simple types
|
||||||
instance ToSample NoContent
|
instance ToSample NoContent
|
||||||
instance ToSample Bool
|
instance ToSample Bool
|
||||||
|
|
Loading…
Reference in a new issue