chrishoermann / zod-prisma-types

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

[Feature Request] Add property to disable generation of XXXFieldUpdateOperationsInputSchema #256

Open StringKe opened 1 month ago

StringKe commented 1 month ago

Is your feature request related to a problem? Please describe. CleanShot 2024-05-30 at 15 32 26@2x

There is some other logic that needs to be executed before I can update the data, and using the update type directly does not satisfy the type validation of the find method.

Describe the solution you'd like Add a property to control whether FieldUpdateOperationsInputSchema related union types need to be generated or not

Describe alternatives you've considered None.

Additional context None.

StringKe commented 1 month ago

@chrishoermann Is it possible to mask the process here? I'm not sure if I've found the right path, I've copied the code for local execution.

https://github.com/chrishoermann/zod-prisma-types/blob/master/packages/generator/src/functions/contentWriters/writeInputObjectType.ts#L43