@@ -35,6 +35,7 @@ import Network.HTTP.Media (MediaType)
35import Servant.API
35import Servant.API
36import Servant.API.Description (FoldDescription,
36import Servant.API.Description (FoldDescription,
37 reflectDescription)
37 reflectDescription)
38+import Servant.API.Generic (ToServantApi)
38import Servant.API.Modifiers (FoldRequired)
39import Servant.API.Modifiers (FoldRequired)
40import Servant.Swagger.Internal.TypeLevel.API
41import Servant.Swagger.Internal.TypeLevel.API
@@ -439,6 +440,9 @@ instance (ToSchema a, Accept ct, HasSwagger sub, KnownSymbol (FoldDescription mo
439 & required ?~ True
440 & required ?~ True
440 & schema .~ ParamBody ref
441 & schema .~ ParamBody ref
443+instance HasSwagger (ToServantApi routes) => HasSwagger (NamedRoutes routes) where
444+ toSwagger _ = toSwagger (Proxy :: Proxy (ToServantApi routes))
442-- =======================================================================
446-- =======================================================================
443-- Below are the definitions that should be in Servant.API.ContentTypes
447-- Below are the definitions that should be in Servant.API.ContentTypes
444-- =======================================================================
448-- =======================================================================