-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
Add ProducesResponseType Description documentation #35009
base: main
Are you sure you want to change the base?
Add ProducesResponseType Description documentation #35009
Conversation
The "What's new in .NET 10" release notes mention the new Description property I added, but the .NET 10 OpenAPI docs do not. This commit adds consistency
I've had issues with the |
Sidenote: .NET 10 Preview 1's When I click on the |
Hello @sander1095 ... The build warnings this morning are appearing on all of our PRs and are unrelated to what you're submitting. A member of our team will file an internal bug report on them. |
@captainsafia ... No giant rush, just making sure that you saw the ping on this one. |
I added a very quick pass to update code spacing and a few other NITs 😈. |
Nevermind! ... I see it now. It's in a different file ... |
The "What's new in .NET 10" release notes mention the new Description property I added, but the .NET 10 OpenAPI docs do not.
This commit adds consistency.
I've added examples for
ProducesResponseType
andProducesDefaultResponseType
to Minimal API and Controller docs. I know a team member doesn't likeProducesDefault
(@mikekistler, dotnet/aspnetcore#58719 (comment) ).I also know that another team member (@captainsafia , dotnet/aspnetcore#58724 (comment)) would prefer developers to use the endpoint-specific OpenAPI transformers (Which will be released in a future preview) instead of setting the
Description
for Minimal API's, as they are more extensible.Therefore, I'd like to discuss the following:
ProducesDefault
? This way, we make it clear that it IS possible by mentioning it's existance, but also "discourage" developers from using it by not showing any explicit code examples.Description
property. However, when Support registering OpenApiOperationTransformer via extension method for Minimal APIs aspnetcore#59180 lands in a future preview, I'd propose we update this page and mention that THAT approach is preferred over theDescription
property in Minimal API scenario's.Fixes #33974
Fixes #35016
Internal previews