Skip to content
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

NSwag.CodeGeneration.Models.ResponseModelBase#IsSuccess has an inadequate expression #5004

Open
markusahrweileramcon opened this issue Oct 21, 2024 · 0 comments

Comments

@markusahrweileramcon
Copy link

With the current code, You cannot create an endpoint which can return a 201 with a response body and a 204.
The getter will check, if the first success response has the same type as any following success responses which will lead to an expection, if the server responds with any other than the first response code.

IMHO, HttpUtilities.IsSuccessStatusCode(StatusCode) should always ne the correct call here.
Sadly, we cannot bypass this problem with a custom template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant