[release/9.0] Don't throw exception for parameters with custom binding source by github-actions[bot] · Pull Request #59533 · dotnet/aspnetcore (original) (raw)
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