-
Notifications
You must be signed in to change notification settings - Fork 412
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
Feature request: validate()
to return validated payload
#4797
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Nice!! Didn’t know it was a thing (default values) — feel free to make a
pull request and a simple test to confirm the returned value, and we can
prioritize it for this Thursday’s release (otherwise when we have the
bandwidth to do so).
Thanks a lot for flagging it
…On Mon, 22 Jul 2024 at 17:48, boring-cyborg[bot] ***@***.***> wrote:
Thanks for opening your first issue here! We'll come back to you as soon
as we can.
In the meantime, check out the #python channel on our Powertools for AWS
Lambda Discord: Invite link <https://discord.gg/B8zZKbbyET>
—
Reply to this email directly, view it on GitHub
<#4797 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBAEOGUAGIYJPFFGA7DZNUSVZAVCNFSM6AAAAABLITB546VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTGI4DCNBQGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
.com>
|
I did some work on this last week but ran into trouble getting the tests to run in the cloud development environment for some reason. I'll try to revisit it this week. |
See: #4839 |
|
Use case
The Validation feature in Powertools uses
fastjsonschema.validate()
to perform the validation. This function infastjsonschema
returns the validated payload. While usually this is exactly the same as the input payload,fastjsonschema
also populatesdefault
values in missing fields. For example, with this schema:And this payload:
The
validate()
function will return:Solution/User Experience
I'm wondering if we can have the Powertools
validate()
function return the results fromfastjsonschema.validate()
.Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: