-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
[BUG] Multiple interfaces with same name but different namespace #1261
Comments
Just noticed the same issue, is there any workaround for this? Except of renaming all the interfaces. |
I am running into the same issue, after switching from RestEase, where this is no issue. I Want to switch to Refit to use System.Text.Json instead of Newtonsoft.Json, because now I have a mix of them both due to different dependencies. So I have the same question as @Almis90; is there a way to work around this, except for renaming all my interfaces? P.S. the message Visual studio gives is Warning CS8785 |
I am trying to fix this and hope to have a PR soon. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
When trying to generate clients from multiple interfaces with the same name, but different namespaces, there seems to be a limit at two interfaces before nothing is generated.
Steps To Reproduce
SampleClient
ISampleClient
interface in theSampleClient.First
namespace with a[Get("/")] Task<string> GetAsync()
methodISampleClient
interface in theSampleClient.Second
namespace with a[Get("/")] Task<HttpResponseMessage> GetAsync()
methodISampleClient
interface in theSampleClient.Third
namespace with a[Get("/")] Task<ApiResponse<string>> GetAsync()
methodRestService.For<T>()
Expected behavior
All three interfaces should generate a different client and work with
RestService.For<T>()
Environment
Additional context
Refit.Internal.Generated
namespace are not generated anymore.The text was updated successfully, but these errors were encountered: