mongoose icon indicating copy to clipboard operation
mongoose copied to clipboard

Converts your Zod schemas into fully-functional Mongoose schemas

Results 12 mongoose issues
Sort by recently updated
recently updated
newest added

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:...

bug

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...

question

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'],...

question

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...

enhancement

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,...

help wanted

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...

documentation