Skip to content

MVC App with nullable return type should include 204 No Content response #58680

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

Open
1 task done
mikekistler opened this issue Oct 28, 2024 · 0 comments
Open
1 task done
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-openapi

Comments

@mikekistler
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The MVC Framework converts a 200 response with "null" response body into a 204 No Content response. Currently only the 200 response is shown in the generated OpenAPI.

Expected Behavior

When the return type of the action method is nullable, the operation should also define a 204 response.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

9.0.100-rc.1.24452.12

Anything else?

Discovered while investigating #58617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-openapi
Projects
None yet
Development

No branches or pull requests

1 participant