mongoose
mongoose copied to clipboard
Converts your Zod schemas into fully-functional Mongoose schemas
I came across this case where nested zod objects marked as optional aren't being converted to required false in the mongoose Schema ``` const addressSchema = z.object({ city: z.string(), zip:...
I am contemplating trying out the library, but I heavily use discriminators, document methods, and model statistics. So I guess my question would be, will this library support the use...
Hi , loving this so far and was wondering if geo location types can be defined fo example ```ts const polygonSchema = new mongoose.Schema({ type: { type: String, enum: ['Polygon'],...
While implementing `@zodyac/zod-mongoose` in my project, I encountered limitations in the following use cases: 1. **Referencing another collection using `uuid` instead of `ObjectId`.** 2. **Array of references with `uuid` or...
When I define a nested object with a enum array this error is thrown `[ { "error": { "json": { "message": "this._def.values is not iterable", "code": -32603, "data": { "code":...
I think there's an error when using optional schemas. If the data isn't submitted for those schemas, the Zod validator passes them correctly, but Mongoose gives an error when trying...
Adds support for z.nativeEnum so typescript enums can be used in schemas
Argument of type 'typeof import("/[email protected]/node_modules/zod/dist/types/v4/index")' is not assignable to parameter of type 'typeof import("/[email protected]/node_modules/zod/lib/external")'. Type 'typeof import("/[email protected]/node_modules/zod/dist/types/v4/index")' is missing the following properties from type 'typeof import("/[email protected]/node_modules/zod/lib/external")': defaultErrorMap, addIssueToContext, makeIssue, EMPTY_PATH,...
I was referring to the docs for my project, but noticed some inconsistency in variable naming, which slightly confused me It at first glance gave me the impression that the...