-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Zod schema import path #76
Comments
I think the issue is a little bit different than the description. Am I right with the following being the actual problem?
|
Yes, that's correct. Paths generated expect the schemas to be directly inside the schemas folder rather than schemas/objects. |
I'm having the same problem; my schemas directory is empty (aside from an enums directory which is also empty) yet all the generated routers are pointing to .schema files within the schemas directory. Could this be related to issue #84 with Prisma 5? |
Bug description
My generated schemas have subfolders for
enums
andobjects
, but the generated routers seem to expect the schemas to be in that root folder instead of in the subfolders.Generated Router:
File Structure:
How to reproduce
npm i prisma-trpc-generator
Add generator to Prisma schema:
npx prisma generate
Expected behavior
Import paths are correct. For example,
import { LocationCreateManySchema } from "../schemas/createManyLocation.schema";
should instead beimport { LocationCreateManySchema } from "../schemas/objects/createManyLocation.schema";
Prisma information
Schema:
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: