Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongoose validators are converted incorrectly #25

Closed
conmanet opened this issue Jun 3, 2020 · 2 comments
Closed

Mongoose validators are converted incorrectly #25

conmanet opened this issue Jun 3, 2020 · 2 comments
Assignees
Labels

Comments

@conmanet
Copy link

conmanet commented Jun 3, 2020

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
@DScheglov DScheglov added the bug label Jun 4, 2020
@DScheglov DScheglov self-assigned this Jun 4, 2020
@DScheglov
Copy link
Owner

DScheglov commented Jun 4, 2020

@conmanet thanks for reporting the bug.
Will fix it soon.
ETA (approximately): June 8, 2020

@DScheglov
Copy link
Owner

Fixed in v1.4.4

Commit: 9e30750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants