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

Merged
merged 2 commits into from
Jan 10, 2025

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

Medium 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

But change is technically a breaking behavioral change.

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
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Dec 26, 2024
@captainsafia
Copy link
Member

/azp run

@dotnet-policy-service dotnet-policy-service bot removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jan 9, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@captainsafia
Copy link
Member

/azp run

@captainsafia
Copy link
Member

Approved via email.

@captainsafia captainsafia added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jan 10, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@captainsafia
Copy link
Member

@BrennanConroy @mikekistler Can I get a review on this backport PR?

Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@wtgodbe wtgodbe merged commit 8e6dbc6 into release/9.0 Jan 10, 2025
25 checks passed
@wtgodbe wtgodbe deleted the backport/pr-59035-to-release/9.0 branch January 10, 2025 21:23
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 9.0.x, 9.0.2 Jan 10, 2025
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-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants