Mongoose validators are converted incorrectly
conmanet opened this issue · 2 comments
conmanet commented
I have this mongoose schema:
name: {
type: String,
maxlength: [256, 'Why name is too long?'] // Mongoose validator: https://mongoosejs.com/docs/validation.html#built-in-validators
},
Calling jsonSchema()
give me the output with maxLength
is an array.
Expected result:
maxLength: 256