@@ -58,7 +58,8 @@ import Servant.API ((:<|>) (..), (:>), BasicAuth, Capt
5858 IsSecure(..), Header, QueryFlag,
5959 QueryParam, QueryParams, Raw,
6060 RemoteHost, ReqBody, Vault,
61− WithNamedContext)
61+ WithNamedContext,
62+ Description, Summary)
6263import Servant.API.ContentTypes (AcceptHeader (..),
6364 AllCTRender (..),
6465 AllCTUnrender (..),
@@ -533,6 +534,18 @@ instance HasServer api context => HasServer (HttpVersion :> api) context where
533534 route Proxy context subserver =
534535 route (Proxy :: Proxy api) context (passToServer subserver httpVersion)
535536
537+-- | Ignore @'Summary'@ in server handlers.
538+instance HasServer api ctx => HasServer (Summary desc :> api) ctx where
539+ type ServerT (Summary desc :> api) m = ServerT api m
540+
541+ route _ = route (Proxy :: Proxy api)
542+
543+-- | Ignore @'Description'@ in server handlers.
544+instance HasServer api ctx => HasServer (Description desc :> api) ctx where
545+ type ServerT (Description desc :> api) m = ServerT api m
546+
547+ route _ = route (Proxy :: Proxy api)
548+
536549-- | Singleton type representing a server that serves an empty API.
537550data EmptyServer = EmptyServer deriving (Typeable, Eq, Show, Bounded, Enum)
538551