@@ -72,11 +72,11 @@ import Servant.API
7272 FromSourceIO (.. ), Header' , Headers (.. ), HttpVersion ,
7373 IsSecure , MimeRender (mimeRender ),
7474 MimeUnrender (mimeUnrender ), NoContent (NoContent ),
75- NoContentVerb , QueryFlag , QueryParam' , QueryParams , Raw ,
76- ReflectMethod (.. ), RemoteHost , ReqBody' , SBoolI , Stream ,
77- StreamBody' , Summary , ToHttpApiData , ToSourceIO ( .. ), Vault ,
78- Verb , WithNamedContext , contentType , getHeadersHList ,
79- getResponse , toQueryParam , toUrlPiece )
75+ NoContentVerb , OperationId , QueryFlag , QueryParam' ,
76+ QueryParams , Raw , ReflectMethod (.. ), RemoteHost , ReqBody' ,
77+ SBoolI , Stream , StreamBody' , Summary , ToHttpApiData ,
78+ ToSourceIO ( .. ), Vault , Verb , WithNamedContext , contentType ,
79+ getHeadersHList , getResponse , toQueryParam , toUrlPiece )
8080import Servant.API.ContentTypes
8181 (contentTypes , AllMime (allMime ), AllMimeUnrender (allMimeUnrender ))
8282import Servant.API.TypeLevel (FragmentUnique , AtLeastOneFragment )
@@ -496,6 +496,14 @@ instance HasClient m api => HasClient m (Description desc :> api) where
496496
497497 hoistClientMonad pm _ f cl = hoistClientMonad pm (Proxy :: Proxy api ) f cl
498498
499+ -- | Ignore @'OperationId'@ in client functions.
500+ instance HasClient m api => HasClient m (OperationId opid :> api ) where
501+ type Client m (OperationId opid :> api ) = Client m api
502+
503+ clientWithRoute pm _ = clientWithRoute pm (Proxy :: Proxy api )
504+
505+ hoistClientMonad pm _ f cl = hoistClientMonad pm (Proxy :: Proxy api ) f cl
506+
499507-- | If you use a 'QueryParam' in one of your endpoints in your API,
500508-- the corresponding querying function will automatically take
501509-- an additional argument of the type specified by your 'QueryParam',
@@ -753,7 +761,7 @@ instance ( HasClient m api
753761
754762-- | Ignore @'Fragment'@ in client functions.
755763-- See <https://ietf.org/rfc/rfc2616.html#section-15.1.3> for more details.
756- --
764+ --
757765-- Example:
758766--
759767-- > type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book]
@@ -774,7 +782,7 @@ instance ( HasClient m api
774782
775783 type Client m (Fragment a :> api ) = Client m api
776784
777- clientWithRoute pm _ = clientWithRoute pm (Proxy :: Proxy api )
785+ clientWithRoute pm _ = clientWithRoute pm (Proxy :: Proxy api )
778786
779787 hoistClientMonad pm _ = hoistClientMonad pm (Proxy :: Proxy api )
780788
0 commit comments