Skip to content

Conversation

tonnico
Copy link
Contributor

@tonnico tonnico commented Aug 26, 2025

Issue number: closes #7039
closes #5325

Summary

Changes

You can use pydantic BaseModel for Query and Header.

User experience

Grouping Query or Header params in one BaseModel.


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.

@tonnico tonnico requested a review from a team as a code owner August 26, 2025 21:54
@tonnico tonnico requested a review from hjgraca August 26, 2025 21:54
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 26, 2025
@tonnico tonnico force-pushed the feat/support-pydantic-in-query-form-header branch from d584a8d to f9141de Compare August 26, 2025 22:03
@anafalcao
Copy link
Contributor

Hey @tonnico ! Thanks for opening this PR, we'll review it and get back to you

@leandrodamascena
Copy link
Contributor

Hey @tonnico thanks a lot for working on this. I see we have some errors in the CI, can you fix them please and then we can start reviewing the code?

@tonnico
Copy link
Contributor Author

tonnico commented Aug 27, 2025

I apologize to overlook make pr.

I still see some improvements and will fix the remaining issues.

@tonnico tonnico force-pushed the feat/support-pydantic-in-query-form-header branch from 131310e to d3b46be Compare August 28, 2025 05:29
@tonnico
Copy link
Contributor Author

tonnico commented Aug 28, 2025

@leandrodamascena I fixed code smell and the remaining typing issues.

Copy link

codecov bot commented Aug 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.45%. Comparing base (d89910c) to head (06b9938).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7253      +/-   ##
===========================================
+ Coverage    96.42%   96.45%   +0.03%     
===========================================
  Files          275      275              
  Lines        13055    13115      +60     
  Branches       974      987      +13     
===========================================
+ Hits         12588    12650      +62     
+ Misses         362      360       -2     
  Partials       105      105              

☔ 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.

@tonnico
Copy link
Contributor Author

tonnico commented Sep 15, 2025

Thanks @leandrodamascena for the good starting point from your initial PR.

I just fixed the merge conflict.

@leandrodamascena
Copy link
Contributor

Reviewing this now.

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Oct 8, 2025
@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Oct 8, 2025
Copy link
Contributor

github-actions bot commented Oct 8, 2025

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hi @tonnico! Thank you so much for your patience while waiting for my final review. I went through 4 or 5 rounds of review. I tried to create a scenario where I could break the code/functionality, and fortunately, I couldn't. I ran e2e tests with this in different scenarios.

This code is complex. You've made some important refactorings, and I can think of two or three different ways to do this implementation with the current codebase. But, to be honest, I don't know if I could do it better than you did here. The abstraction you create for some functions, the refactoring to reduce complexity, and the clarity of the code are very good. I hope I'm not missing any major potential problem I haven't seen, but our current tests are passing and that brings more peace.

That's really a super PR, thanks a lot. I sent a commit with some changes in the doc and we are ready to merge tomorrow or Friday.

THANKS A LOT! APPROVED!!!!!

@tonnico
Copy link
Contributor Author

tonnico commented Oct 9, 2025

Wow, thanks so much for your review and the nice feedback! Appreciate all the time you spent testing and checking different scenarios. Glad it held up. Looking forward to the merge!

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Oct 9, 2025
Copy link
Contributor

github-actions bot commented Oct 9, 2025

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Oct 9, 2025
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Oct 10, 2025
Copy link

Copy link
Contributor

⚠️Large PR detected⚠️

Please consider breaking into smaller PRs to avoid significant review delays. Ignore if this PR has naturally grown to this size after reviews.

@github-actions github-actions bot removed the documentation Improvements or additions to documentation label Oct 10, 2025
@leandrodamascena leandrodamascena removed the on-hold This item is on-hold and will be revisited in the future label Oct 10, 2025
@leandrodamascena leandrodamascena merged commit 21b7235 into aws-powertools:develop Oct 10, 2025
18 checks passed
oyiz-michael added a commit to oyiz-michael/powertools-lambda-python that referenced this pull request Oct 14, 2025
Merge conflicts resolved after upstream PRs aws-powertools#7227 and aws-powertools#7253:

Core Changes:
- Updated File class rename from File -> _File with public File alias
- Fixed Union import for _resolve_field_type function
- Removed unused _File import in dependant.py
- Maintained all UploadFile and validation functionality

Testing:
- All 25 comprehensive tests passing
- 96.36%+ codecov coverage maintained
- Code quality checks passing (make format && make pr)

Compatibility:
- Preserves public File API for backward compatibility
- Maintains UploadFile OpenAPI schema generation
- All validation middleware features intact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers feature New feature or functionality size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: alias generator for Query, Path or Header Feature request: improve support for parameter injection

4 participants