-
-
Notifications
You must be signed in to change notification settings - Fork 748
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]: Refit 8 breaks ability to cast IApiResponse<T> to IApiResponse #1949
Comments
Duplicate of #1933 |
Not sure if I got your sample but I can't reproduce it here Could you please provide the PR with test? |
So my bug report is incorrect. The production code will still work, it's just the mocking that's the problem. Good to know. Still, introducing a breaking change (even if just in tests) for slightly nicer IDE reporting seems excessive. |
Yep. It's a "kind of" breaking change. We need to find a tradeoff between mocking correct interfaces and using NRT annotations. And it's not about IDE reporting. It's analyzers (with warning as errors msbuild reports build errors) |
Closing as a duplicate, because #1933 is a much better description of the problem. |
Describe the bug 🐞
The PR #1879 breaks our old code. Our API uses the generic version of
IApiResponse<T>
, but there are some implementation methods which accept the baseIApiResponse
. This works fine in 7.2.22. But in 8.0.0IApiResponse<T>.Error
andIApiResponse.Error
are different fields, so in this caseIApiResponse.Error
is alwaysnull
no matter what.Steps to reproduce
In pseudocode:
Expected behavior
Applications should be able to use the base interface to access common response fields.
Refit Version
8.0.0
The text was updated successfully, but these errors were encountered: