Closed lottamus closed 1 year ago
This is a cool addition. Thanks for your work on this and other PRs
We should also pass these options values to Zod generator under the hood so it could skip any extra schemas from being generated. That is for a future thing of course.
Description
Currently, we're generating a route for every possible model action, sometimes resulting in unused code.
This PR adds an optional config to enable specific model actions.
Example Input:
Example output:
References
It would be much nicer to allow providing an array for
generateModelActions
, however it seems this currently is not possible: https://github.com/prisma/prisma/issues/9511Other
We could also expose this functionality at the model level too