chrishoermann / zod-prisma-types

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

Uppercase issues #173

Closed joe-Thanapol closed 11 months ago

joe-Thanapol commented 11 months ago

Overview

TS cannot find zod object because name mismatch ( Uppercase )

  1. DepartmentCountOutputTypeArgsSchema and departmentCountOutputTypeArgsSchema (line 211 and 219)
  2. Prisma generate DepartmentCountOutputTypeDefaultArgs... but zod-prisma-types use z.ZodType<Prisma.departmentCountOutputTypeDefaultArgs> (line 219)

image

Versions used

"@prisma/client": "^5.1.1" "zod": "3.21.1" "zod-prisma-types": "^2.7.9"

joe-Thanapol commented 11 months ago

Update, I found out that the problem was with my prisma schema. Some models are Camel Case, some are Snake Case, So I changed all models to Camel Case and it work. Thanks for the wonderful package.