Awey
05/30/2022, 12:41 AMclass-validator.Kasir Barati
05/30/2022, 8:34 AMJarupong Pajakgo
05/30/2022, 8:37 AMNurul
05/30/2022, 1:11 PMzod-prisma is a good choice if you want to define your validations in schema.prisma file.Omar
05/30/2022, 1:49 PMzod-prisma produces top level model schemas(if you have two models in prisma schema, you get two schemas written in Zod).
• prisma-zod-generator produces full CRUD schemas using Zod.
• prisma-joi-generator produces full CRUD schemas using Joi.
• prisma-yup-generator produces full CRUD schemas using Yup.
• prisma-class-validator-generator produces top level classes that are validated using Class Validator's decoratorsAwey
06/01/2022, 10:30 PMbody: Prisma.PostWhereUniqueInput or something along those lines. If you took the DTO route you'd do something like body: CreatePostDto and this would be something you write out by hand and maintain. I was just wondering what the best practice was between the generated Prisma types and defining your own DTOs.Awey
06/01/2022, 10:30 PM