-
Notifications
You must be signed in to change notification settings - Fork 402
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(data-classes): decode json_body if based64 encoded #560
feat(data-classes): decode json_body if based64 encoded #560
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #560 +/- ##
========================================
Coverage 99.86% 99.86%
========================================
Files 113 113
Lines 4485 4485
Branches 243 243
========================================
Hits 4479 4479
Misses 3 3
Partials 3 3
Continue to review full report at Codecov.
|
@heitorlessa it is a pretty small change, if you want to have a look |
Oh, I thought I did!! Thanks for the nudge |
@@ -65,7 +65,7 @@ def body(self) -> Optional[str]: | |||
@property | |||
def json_body(self) -> Any: |
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.
Should we fix the older type annotation you Dict[str, Any] here too?
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.
It could be a list too :)
Eer, true
…On Tue, 27 Jul 2021 at 06:33, Michael Brewer ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In aws_lambda_powertools/utilities/data_classes/common.py
<#560 (comment)>
:
> @@ -65,7 +65,7 @@ def body(self) -> Optional[str]:
@Property
def json_body(self) -> Any:
It could be a list too :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#560 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBGAS3YIQYPBJCZGSB3TZYZJHANCNFSM5A43S76A>
.
|
* develop: feat(params): expose high level max_age, raise_on_transform_error (#567) fix(parser): apigw wss validation check_message_id; housekeeping (#553) chore(deps-dev): bump isort from 5.9.2 to 5.9.3 (#574) feat(data-classes): decode json_body if based64 encoded (#560) chore(deps-dev): bump mkdocs-material from 7.2.0 to 7.2.1 (#566)
Issue #, if available:
Description of changes:
Use
decoded_body
for the body injson_body
. This will allow for a json string that is base64 encoded to be decoded and parsed in one go.Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.