Skip to content

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

Closed
@am29d

Description

@am29d

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.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippeddocumentationImprovements or additions to documentationparserThis item relates to the Parser Utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions