prisma-zod-generator
prisma-zod-generator copied to clipboard
Prisma 2+ generator to emit Zod schemas from your Prisma schema
### Bug description I have a following error during compilation when I trying to use types. ```Type 'ZodObject' is not assignable to type 'ZodType'. The types of '_type.update' are incompatible...
### Description See #88 in reference to the issue. This implements the `satisfies` keyword for the type instead of inferring the zodType directly. ```typescript import { z } from 'zod';...
## Problem I am using fastify + fastify-zod. The fastify-zod required a return schema. ## Suggested solution Would you consider adding the payload schema? ## Alternatives Or I can contribute...
## Problem Generated schemas are not reusable (pick/omit/extend/etc) because the schema infers a type and is not considered a ZodObject anymore. An example... ``` const Schema: z.ZodType = z.object({ title:...
### Bug description The generated router at `generated/routers/Post.router.ts` ```ts createOnePost: protectedProcedure .input(PostCreateOneSchema).mutation(async ({ ctx, input }) => { const createOnePost = await ctx.prisma.post.create(input); return createOnePost; }), ``` has the following...
I forked this repo for my own personal use case and stumbled upon some issues when attempting to upgrade to prisma 5.1.1 Just wanted to leave some notes here of...
### Bug description All the imports would need to end with `.js` extension. ### How to reproduce Try to use in a ESM module. ### Expected behavior _No response_ ###...
Bump `prettier` and `@types/prettier` to support the new 3.0 release
### Description > when a user chooses a custom output directory, everything inside of that directory is deleted. > it is common for users to put code in `/src` directory,...
## Problem I would love it if there was an option to only generate CRUD schemas ## Suggested solution add a `minimal` option which would only generate CRUD operations