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

[release/9.0] Don't throw exception for parameters with custom binding source #59533

Open
wants to merge 2 commits into
base: release/9.0
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 18, 2024

Backport of #59035 to release/9.0

/cc @captainsafia

Description

This change ensures that parameters with custom binding sources do not throw exceptions. Users will need to set the parameter location themselves via transformers, as this information cannot be determined implicitly. Additionally, if users want to specify a custom binder for a parameter from the body, they must define the binding source correctly on the model binder to ensure the argument appears under the requestBody field of the operation instead of the parameters field.

Fixes #59013

Customer Impact

No accessible workarounds are available for this change. This impacts APIs that use third-party packages which implement custom model binding rules for parameters sourced from the request's URL route, like Oqtane and Asp.Versioning.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

Low risk because change is localized to:

  • APIs associated with MVC-based applications
  • That use route or query parameters
  • And have custom model binding logic provided

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@github-actions github-actions bot requested review from captainsafia and a team as code owners December 18, 2024 01:08
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Dec 18, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0.x milestone Dec 18, 2024
@captainsafia captainsafia added Servicing-consider Shiproom approval is required for the issue feature-openapi labels Dec 18, 2024
Copy link
Contributor

Hi @github-actions[bot]. 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.

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 Servicing-consider Shiproom approval is required for the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant