-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add ApiParameterDescription to ApiDescription to represent the request body - 35421 #35654
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
Merged
rafikiassumani-msft
merged 9 commits into
dotnet:main
from
rafikiassumani-msft:open-api
Aug 26, 2021
Merged
Add ApiParameterDescription to ApiDescription to represent the request body - 35421 #35654
rafikiassumani-msft
merged 9 commits into
dotnet:main
from
rafikiassumani-msft:open-api
Aug 26, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pranavkm
suggested changes
Aug 24, 2021
src/Mvc/Mvc.ApiExplorer/src/EndpointMetadataApiDescriptionProvider.cs
Outdated
Show resolved
Hide resolved
pranavkm
reviewed
Aug 25, 2021
src/Mvc/Mvc.Core/src/Builder/OpenApiEndpointConventionBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
pranavkm
approved these changes
Aug 26, 2021
src/Http/Routing/test/UnitTests/Builder/DelegateEndpointRouteBuilderExtensionsTest.cs
Outdated
Show resolved
Hide resolved
src/Http/Routing/test/UnitTests/Builder/DelegateEndpointRouteBuilderExtensionsTest.cs
Outdated
Show resolved
Hide resolved
src/Http/Routing/test/UnitTests/Builder/DelegateEndpointRouteBuilderExtensionsTest.cs
Outdated
Show resolved
Hide resolved
Comment on lines
+133
to
+134
| public static DelegateEndpointConventionBuilder Accepts<TRequest>(this DelegateEndpointConventionBuilder builder, | ||
| string contentType, params string[] additionalContentTypes) |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| public static DelegateEndpointConventionBuilder Accepts<TRequest>(this DelegateEndpointConventionBuilder builder, | |
| string contentType, params string[] additionalContentTypes) | |
| public static DelegateEndpointConventionBuilder Accepts<TRequest>(this DelegateEndpointConventionBuilder builder, string contentType, params string[] additionalContentTypes) |
rafikiassumani-msft
added a commit
to rafikiassumani-msft/aspnetcore
that referenced
this pull request
Aug 26, 2021
…t body - 35421 (dotnet#35654) * flow addition parameters to swagger
Contributor
Author
|
/backport release/6.0-rc1 |
|
Hi @rafikiassumanimsft. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-minimal-actions
Controller-like actions for endpoint routing
old-area-web-frameworks-do-not-use
*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Title
Add the Api Parameter Description to API Explorer to represent the request body.
PR Description
ApiExplorershould be updated to add aApiParameterDescriptionto theApiDescriptionto represent the incoming request body based on the details in the endpoint'sIApiRequestMetadataProvidermetadata if present.API Change included.
This change adds a generic constraint (
where TRequest : notnull) to a newly added API for rc1 .namespace Microsoft.AspNetCore.Http { public static class OpenApiEndpointConventionBuilderExtensions { + public static DelegateEndpointConventionBuilder Accepts<TRequest>(this DelegateEndpointConventionBuilder + builder, string contentType, params string[] additionalContentTypes) where TRequest : notnull } }Fixes #35421