chrishoermann / zod-prisma-types

Generator creates zod types for your prisma models with advanced validation
Other
626 stars 47 forks source link

Add possibility to remove fields from generated zod schemas #33

Closed chrishoermann closed 1 year ago

chrishoermann commented 1 year ago

Maybe some fields in the database do not need to be added to the zod schemas of the models or input types.

@zod.custom.omit(["model", "input"]), @zod.custom.exclude(["model", "input"]) or some similar key could be used to implement this behaviour where model would exclude the field in the generated model schemas and input would exclude the field in the generated input schemas like UserCreateInput, ...

chrishoermann commented 1 year ago

implemented in v1.1.0