@@ -58,7 +58,8 @@ import Servant.API ((:<|>) (..), (:>), BasicAuth, Capt
58 IsSecure(..), Header, QueryFlag,
58 IsSecure(..), Header, QueryFlag,
59 QueryParam, QueryParams, Raw,
59 QueryParam, QueryParams, Raw,
60 RemoteHost, ReqBody, Vault,
60 RemoteHost, ReqBody, Vault,
61− WithNamedContext)
61+ WithNamedContext,
62+ Description, Summary)
62import Servant.API.ContentTypes (AcceptHeader (..),
63import Servant.API.ContentTypes (AcceptHeader (..),
63 AllCTRender (..),
64 AllCTRender (..),
64 AllCTUnrender (..),
65 AllCTUnrender (..),
@@ -533,6 +534,18 @@ instance HasServer api context => HasServer (HttpVersion :> api) context where
533 route Proxy context subserver =
534 route Proxy context subserver =
534 route (Proxy :: Proxy api) context (passToServer subserver httpVersion)
535 route (Proxy :: Proxy api) context (passToServer subserver httpVersion)
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
541+ route _ = route (Proxy :: Proxy api)
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
547+ route _ = route (Proxy :: Proxy api)
536-- | Singleton type representing a server that serves an empty API.
549-- | Singleton type representing a server that serves an empty API.
537data EmptyServer = EmptyServer deriving (Typeable, Eq, Show, Bounded, Enum)
550data EmptyServer = EmptyServer deriving (Typeable, Eq, Show, Bounded, Enum)