New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic interface support #70
Conversation
This looks great! Update the docs and |
@@ -352,8 +352,10 @@ public RestMethodInfo(Type targetInterface, MethodInfo methodInfo) | |||
} | |||
} | |||
|
|||
void verifyUrlPathIsSane(string relativePath) | |||
{ | |||
void verifyUrlPathIsSane(string relativePath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
⬇️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I haven't yet figured out how to get R# to respect your conventions and sometimes I miss mistakes. Do you use it? Might be worth checking in a settings file if you have one.
All updated. (I noticed the code blocks in the readme weren't getting syntax highlighting like the blocks above, so I changed them all to "csharp" rather than "cs" and it seems to be working now. I could have sworn "cs" used to be enough.) |
Thanks @bennor! |
Just had to try using a Type Parameterized Api. Could be pretty useful. Like this: reactiveui/refit#70
When using something like Web API, it's a fairly common pattern to have a whole stack of CRUD rest services. Refit now supports these, allowing you to define a single API interface with a generic type:
Which can then be used like this:
This fixes #63.
I will update the docs to something like the above if you're happy with the changes.