omar-dulaimi / prisma-zod-generator

Prisma 2+ generator to emit Zod schemas from your Prisma schema
MIT License
535 stars 45 forks source link

Allow excluding specific models(and related relation fields in other models) from getting generated #41

Closed omar-dulaimi closed 1 year ago

omar-dulaimi commented 1 year ago

Problem

Currently, there's no way to hide some models from the generated schemas.

Suggested solution

Provide a unified way to exclude models through comments.

Alternatives

N/A

Additional context

This was requested in Prisma tRPC Generator library, to hide certain routers from frontend, which as a result means some schemas should not get generated.

omar-dulaimi commented 1 year ago

Released in https://github.com/omar-dulaimi/prisma-zod-generator/releases/tag/0.8.0