Closed hollandjake closed 9 months ago
Hey, @hollandjake! Thanks for reaching out with an issue.
This issue will be fixed with the next iteration of library asap.
Done!
A newer version, @zodyac/zod-mongoose 1.1.2
, now generates a Zod agnostic schema.
I also added an experimental support for UUIDs
.
Please let me know if there's anything else we could improve. Enjoy your day!
Expected Behaviour
When using the
zodSchema
function, it should generate a zod agnostic mongoose schema.Current Behaviour
When using the
zodSchema
function, it generates a mongooseSchema
of which its raw type is still the zod schema types.Context
https://github.com/git-zodyac/mongoose/blob/506bc0e304ffc0f239ffed92f9b124cd24562a2a/src/index.ts#L50-L55
Possible Solution