-
-
Notifications
You must be signed in to change notification settings - Fork 738
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
Stubs aren't generated unless service is instantiated in the same project #65
Comments
For me this also happened by just putting the So i had a To workaround that i put a public static class SomeApi
{
public static ISomeApi GetService(string address)
{
return RestService.For<ISomeApi>(address);
}
} in the same file which works but is not that nice. |
👍 for this one. In my current project we are using a factory that wraps the calls for |
This will be fixed by #67, which should be merged when @paulcbetts has had time to review it. 😸 If you are desperate, you could build your own In the meantime, a temporary workaround is just to have another class in the same project as the interfaces that calls |
InterfaceStubGenerator
needs there to be a call toRestService.For<ISomeApi>()
in the same project thatISomeApi
is defined or it won't generate a stub for it.We should be able to fix this by looking for all interfaces that have an attribute derived from
HttpMethodAttribute
on a method and making stubs for them.This awesome error shows up when you try to create the service later too: https://gist.github.com/screamish/ccc46cb849cc4497ea8e
The text was updated successfully, but these errors were encountered: