Skip to content

Using zod to generate table schema #265

Answered by kettanaito
salehi-hassan asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, @salehi-hassan.

There is no support for using Zod as the source of truth for the schema. We use our own schema format, although it concerns itself with the data shape without any data type validation on top.

Frankly, I'm not sure how feasible it'd be to support Zod given that schema format difference. The logic of Data is rooted in the fixed model definition, property proxies that enable relationships, and a few other things specific to Data that Zod won't have. As of now, I would not consider this as a support candidate but you are welcome to pursue adapters between Zod/Data to make things work.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@salehi-hassan
Comment options

@kettanaito
Comment options

Answer selected by kettanaito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #264 on February 06, 2023 10:45.