Skip to content

Docs: add parser example to extend built-in schema with JSON parse #2891

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

Closed
1 task done
am29d opened this issue Aug 7, 2024 · 2 comments · Fixed by #2901
Closed
1 task done

Docs: add parser example to extend built-in schema with JSON parse #2891

am29d opened this issue Aug 7, 2024 · 2 comments · Fixed by #2901
Assignees
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation parser This item relates to the Parser Utility

Comments

@am29d
Copy link
Contributor

am29d commented Aug 7, 2024

What were you searching in the docs?

We have an example how to extend a built-in schema for EventBridgeSchema which is a trivial case where there is no transformation needed, because the input is an object.

In cases when we haven a stringified object inside the payload i.e. SQS or API Gateway, we need to use .transform() and .pipe() functions from zod. A missing example was identified in #2844 .

Is this related to an existing documentation section?

No response

How can we improve?

Add an example how to extend a built in schema for APIGatgewayProxyEvent which takes a string and uses transform() and pipe() functions.

Got a suggestion in mind?

No response

Acknowledgment

  • I understand the final update might be different from my proposed suggestion, or refused.
@am29d am29d added documentation Improvements or additions to documentation triage This item has not been triaged by a maintainer, please wait labels Aug 7, 2024
@am29d am29d self-assigned this Aug 7, 2024
@am29d am29d moved this from Triage to Working on it in Powertools for AWS Lambda (TypeScript) Aug 7, 2024
@am29d am29d added parser This item relates to the Parser Utility and removed triage This item has not been triaged by a maintainer, please wait labels Aug 7, 2024
@dreamorosi dreamorosi moved this from Working on it to Coming soon in Powertools for AWS Lambda (TypeScript) Aug 8, 2024
@dreamorosi dreamorosi added the pending-release This item has been merged and will be released soon label Aug 8, 2024
Copy link
Contributor

github-actions bot commented Aug 8, 2024

⚠️ COMMENT VISIBILITY WARNING ⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

Copy link
Contributor

github-actions bot commented Aug 8, 2024

This is now released under v2.7.0 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Aug 8, 2024
@dreamorosi dreamorosi moved this from Coming soon to Shipped in Powertools for AWS Lambda (TypeScript) Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped documentation Improvements or additions to documentation parser This item relates to the Parser Utility
Projects
2 participants