Skip to content

Conversation

@leandrodamascena
Copy link
Contributor

Issue number: closes #7552

Summary

This PR fixes the broken behavior when setting alias or validation_alias in Query, Header, and other param classes after Pydantic 2.12.0 update.

Changes

  • Set validation_alias to alias value when only alias is provided
  • Set alias to validation_alias value when only validation_alias is provided
  • Updated default value of validation_alias from None to _Unset in Param, Path, Query, Header, Body, and Form classes

User experience

Please share what the user experience looks like before and after this change


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@leandrodamascena leandrodamascena requested a review from a team as a code owner January 5, 2026 14:56
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 5, 2026
@github-actions github-actions bot added the bug Something isn't working label Jan 5, 2026
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.54%. Comparing base (26f44a8) to head (4c6741a).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7901   +/-   ##
========================================
  Coverage    96.54%   96.54%           
========================================
  Files          275      275           
  Lines        13199    13209   +10     
  Branches      1002     1006    +4     
========================================
+ Hits         12743    12753   +10     
  Misses         353      353           
  Partials       103      103           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Jan 6, 2026
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Jan 6, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 6, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.8% Duplication on New Code

See analysis details on SonarQube Cloud

@leandrodamascena leandrodamascena merged commit 11b68ff into develop Jan 6, 2026
18 checks passed
@leandrodamascena leandrodamascena deleted the fix/pydantic-alias branch January 6, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working event_handlers size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Broken behaviour for setting alias in Query Annotated Field after pydantic 2.12.0 update

2 participants