@@ -35,6 +35,7 @@ import Network.HTTP.Media (MediaType)
3535import Servant.API
3636import Servant.API.Description (FoldDescription,
3737 reflectDescription)
38+import Servant.API.Generic (ToServantApi)
3839import Servant.API.Modifiers (FoldRequired)
3940
4041import Servant.Swagger.Internal.TypeLevel.API
@@ -439,6 +440,9 @@ instance (ToSchema a, Accept ct, HasSwagger sub, KnownSymbol (FoldDescription mo
439440 & required ?~ True
440441 & schema .~ ParamBody ref
441442
443+instance HasSwagger (ToServantApi routes) => HasSwagger (NamedRoutes routes) where
444+ toSwagger _ = toSwagger (Proxy :: Proxy (ToServantApi routes))
445+
442446-- =======================================================================
443447-- Below are the definitions that should be in Servant.API.ContentTypes
444448-- =======================================================================