@@ -72,11 +72,11 @@ import Servant.API
72
72
FromSourceIO (.. ), Header' , Headers (.. ), HttpVersion ,
73
73
IsSecure , MimeRender (mimeRender ),
74
74
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 )
80
80
import Servant.API.ContentTypes
81
81
(contentTypes , AllMime (allMime ), AllMimeUnrender (allMimeUnrender ))
82
82
import Servant.API.TypeLevel (FragmentUnique , AtLeastOneFragment )
@@ -496,6 +496,14 @@ instance HasClient m api => HasClient m (Description desc :> api) where
496
496
497
497
hoistClientMonad pm _ f cl = hoistClientMonad pm (Proxy :: Proxy api ) f cl
498
498
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
+
499
507
-- | If you use a 'QueryParam' in one of your endpoints in your API,
500
508
-- the corresponding querying function will automatically take
501
509
-- an additional argument of the type specified by your 'QueryParam',
@@ -753,7 +761,7 @@ instance ( HasClient m api
753
761
754
762
-- | Ignore @'Fragment'@ in client functions.
755
763
-- See <https://ietf.org/rfc/rfc2616.html#section-15.1.3> for more details.
756
- --
764
+ --
757
765
-- Example:
758
766
--
759
767
-- > type MyApi = "books" :> Fragment Text :> Get '[JSON] [Book]
@@ -774,7 +782,7 @@ instance ( HasClient m api
774
782
775
783
type Client m (Fragment a :> api ) = Client m api
776
784
777
- clientWithRoute pm _ = clientWithRoute pm (Proxy :: Proxy api )
785
+ clientWithRoute pm _ = clientWithRoute pm (Proxy :: Proxy api )
778
786
779
787
hoistClientMonad pm _ = hoistClientMonad pm (Proxy :: Proxy api )
780
788
0 commit comments