-
Notifications
You must be signed in to change notification settings - Fork 407
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
feat(parser): add models for API GW Websockets events #5597
feat(parser): add models for API GW Websockets events #5597
Conversation
No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure. |
Hi @ran-isenberg! Thanks for submitting this PR! Assigning @anafalcao to review this. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5597 +/- ##
===========================================
+ Coverage 96.14% 96.17% +0.02%
===========================================
Files 229 231 +2
Lines 10854 10915 +61
Branches 2018 2018
===========================================
+ Hits 10436 10497 +61
Misses 329 329
Partials 89 89 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Thank you for submitting this PR so promptly, @ran-isenberg ! I was off today, but tomorrow I'll begin to review it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ran-isenberg, I suggested some changes in a initial review.
I see the CI is failing, but don't worry, it's not related to your PR. We are verifying it
aws_lambda_powertools/utilities/parser/models/apigw_websocket_api.py
Outdated
Show resolved
Hide resolved
@anafalcao all fixed! also renamed one of the files and found a documentation mistake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ran-isenberg ! Looking good so far, but there are a few comments. Can you take a look, please?
Np, thanks again @ran-isenberg ! I pushed those small changes, but the overall looks very good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ran-isenberg! Thank you very much for sending this PR, it's very good as always.
I know that the event sent by AWS uses CamelCase by default and we can't change it for obvious reasons, but I would like to make the fields snake case on our side and work with Pydantic Fields. I also know that most of our events use CamelCase, but I would like to have this convention about capitalization - We've done this on newer models like Cloudformation Custom Resource, VPC Lattice 2, and Bedrock. Can you please change this @anafalcao? I left 2 examples that you can extend to any other.
After this change we are good to merge this PR! 🚀
aws_lambda_powertools/utilities/parser/models/apigw_websocket.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/parser/envelopes/apigw_websocket_api.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/parser/models/apigw_websocket.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/parser/models/apigw_websocket.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/parser/models/apigw_websocket.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/parser/envelopes/apigw_websocket_api.py
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all the feedback @anafalcao!
I'm approving this PullRequest and please open a new issue to add the same support for Event Source Data Classes!
APPROVED!!!
20c0b74
into
aws-powertools:develop
Whoohooo! Thx @anafalcao and @leandrodamascena |
Issue number: #5543
Summary
Added support for parser and websockers api
Changes
Used this doc and my own files.
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-integration-requests.html
User experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
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.