We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Methods with nullable response types have not null default value. It's an implementation of dto class with default fields.
null
default
[HttpGet()] async Task<ActionResult<SomeDto>> Get(int id, CancellationToken token) { if (id == 0) { return NotFound(); } return await dataFactory.CreateAsync(id, token); }
public interface ISomeClient { [Get("api/some")] Task<SomeDto?> GetById(int id); }
public Task<Exception?> CreateAsync(HttpResponseMessage responseMessage) => responseMessage.StatusCode == HttpStatusCode.NotFound ? Task.FromResult<Exception?>(null) : factory.CreateAsync(responseMessage);
https://github.com/reactiveui/refit
Generated client's method reposonse type must be nullable, default value for this method must be null instead of dto instance with default fields.
Inteliji Rider
Windows
21H2 19044.3570
PC
7.0.0
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug 🐞
Methods with nullable response types have not
null
default value. It's an implementation of dto class withdefault
fields.Step to reproduce
null
but a dto instance with default field values.Reproduction repository
https://github.com/reactiveui/refit
Expected behavior
Generated client's method reposonse type must be nullable, default value for this method must be
null
instead of dto instance with default fields.Screenshots 🖼️
IDE
Inteliji Rider
Operating system
Windows
Version
21H2 19044.3570
Device
PC
Refit Version
7.0.0
Additional information ℹ️
No response
The text was updated successfully, but these errors were encountered: