-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix support for parameter names sourced from attributes (#45572) #45591
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
Conversation
Hi @captainsafia. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
Hi @captainsafia. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
Hi @captainsafia. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed. |
Approved via email. |
@captainsafia were you asking for a merge❔ One QQ on the changes: Don't |
Yep! 😄
AFAIK, they just use the filename. However, with the OpenAPI specification, form uploads are treated as part of the request body and are documented separately from request parameters (sourced from routes, queries, headers) which support a unique name field. The request body of the OpenAPI schema doesn't support custom names in the same way AFAIK. |
Backport of #45572 to
release/7.0
.Description
This change resolves an issue where OpenAPI generation via the
WithOpenApi
method did not factor for theName
argument in parameters sourced from routes or queries via the explicitFromRoute
andFromQuery
.Fixes #45542
Customer Impact
This bug fix addresses a user-submitted bug report that is presented as a regression from .NET 6. Without this bug fix, users are not able to successfully test endpoints that use explicit binding source attributes with a name via the Swagger UI and the generated OpenAPI document.
Regression?
This is a regression in behavior that was available in .NET 6.
Risk
Low risk because this change updates the new OpenAPI package to match the behavior of the existing ApiExplorer implementation.
Verification
Packaging changes reviewed?