[FEATURE]: Export factory functions from `drizzle-zod` to allow usage with extended Zod classes
Describe what you want
To allow generating schemas from an extended Zod class, such as: https://github.com/honojs/middleware/tree/main/packages/zod-openapi
Currently, this doesn't work since generated schemas are using the default z object which will cause runtime errors if later combined with .openapi() from the lib above
Something like this would be nice
import { z } from '@hono/zod-openapi'
import { createInsertSchemaFactory } from 'drizzle-zod/factories'
import { User } from '~/schema'
const createInsertSchema = createInsertSchemaFactory(z);
const InsertUser = createInsertSchema(User)
// later
InsertUser.openapi() // works
This would be very helpful. I don't understand how people use Hono with Drizzle without this, is everyone duplicating their source of truth?
Really need this +1
Hey, any known workarounds for this so far? Specifically when using with zod-openapi?
Need this as well. Hope this can get implemented.
that would be very nice!