From 54e42c92864230f4c158e0783ff5bc67006f2470 Mon Sep 17 00:00:00 2001 From: vendethiel Date: Wed, 22 Nov 2023 11:18:43 +0100 Subject: [PATCH] Add an HasOpenApi instance for AuthProtect --- src/Servant/OpenApi/Internal.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Servant/OpenApi/Internal.hs b/src/Servant/OpenApi/Internal.hs index 7551058..3e4a8c5 100644 --- a/src/Servant/OpenApi/Internal.hs +++ b/src/Servant/OpenApi/Internal.hs @@ -431,6 +431,11 @@ instance (HasOpenApi (ToServantApi sub)) => HasOpenApi (NamedRoutes sub) where toOpenApi _ = toOpenApi (Proxy :: Proxy (ToServantApi sub)) #endif +#if MIN_VERSION_servant(0,5,0) +instance (HasOpenApi sub) => HasOpenApi (AuthProtect a :> sub) where + toOpenApi _ = toOpenApi (Proxy :: Proxy sub) +#endif + -- ======================================================================= -- Below are the definitions that should be in Servant.API.ContentTypes -- =======================================================================