Skip to content

Commit dcc3154

Browse files
committed
WithResource for servant 0.20
1 parent 90f7a44 commit dcc3154

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Servant/OpenApi/Internal.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,12 @@ instance (HasOpenApi sub) => HasOpenApi (RemoteHost :> sub) where
287287
instance (HasOpenApi sub) => HasOpenApi (HttpVersion :> sub) where
288288
toOpenApi _ = toOpenApi (Proxy :: Proxy sub)
289289

290+
#if MIN_VERSION_servant(0,20,0)
291+
-- | @'WithResource'@ combinator does not change our specification at all.
292+
instance (HasOpenApi sub) => HasOpenApi (WithResource res :> sub) where
293+
toOpenApi _ = toOpenApi (Proxy :: Proxy sub)
294+
#endif
295+
290296
-- | @'WithNamedContext'@ combinator does not change our specification at all.
291297
instance (HasOpenApi sub) => HasOpenApi (WithNamedContext x c sub) where
292298
toOpenApi _ = toOpenApi (Proxy :: Proxy sub)

0 commit comments

Comments
 (0)