Merge pull request #1582 from haskell-servant/named-routes-servant-docs
Add support for NamedRoutes in servant-docs
This commit is contained in:
commit
c48a6702b7
1 changed files with 4 additions and 0 deletions
|
@ -62,6 +62,7 @@ import GHC.TypeLits
|
|||
import Servant.API
|
||||
import Servant.API.ContentTypes
|
||||
import Servant.API.TypeLevel
|
||||
import Servant.API.Generic
|
||||
|
||||
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)
|
||||
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
|
||||
instance ToSample NoContent
|
||||
instance ToSample Bool
|
||||
|
|
Loading…
Reference in a new issue