WAAYZZz 🍀
Use zod schema generated with prisma with @hono/zod-openapi
Is there a way to use already generated zod schema with @hono/zod-openapi ?
The Zod schemas generated by Prisma are not enhanced the way @hono/zod-openapi provides. Does anyone know a way to enhance them for use with createRoute from @hono/zod-openapi (request.params, json validator, ...)
81 replies
Type checking with Hono + prisma + zod -> return json date (expect string)
HI, i m usin openAPi I declared return params in my route
my prisma schema generating
But since the json return transform date to string, type checking is wrong. What is the best thing to do to handle that ? (the return schema is generated by zod-prisma-types)
it's look easy but i m new with zod and openApi
If i change z.coerce.date() to z.string() type checking will work, but thoz zod object is auto generated by zod-prisma-types
2 replies