Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Upgrade MongoDB to support schema validation error messages #408

Open
gunnartorfis opened this issue Oct 13, 2020 · 3 comments
Open

Upgrade MongoDB to support schema validation error messages #408

gunnartorfis opened this issue Oct 13, 2020 · 3 comments
Labels
in-discussion We are still discussing how to solve or implement it Project:Minimongo Project:Mongo Driver

Comments

@gunnartorfis
Copy link

gunnartorfis commented Oct 13, 2020

Current MongoDB's schema validation implementation does not give any descriptive error messages. This feature solves that issue by giving better feedback for what fails the validation.

There has not been an official release yet although it appears to be available on the master branch. The reason I'm posting this issue now is to give a heads-up for when this will be an official release.

@radekmie
Copy link
Collaborator

According to this comment it won't be available in 4.x series but rather in 5.0 (mid-2021 as the comment states).

@StorytellerCZ
Copy link
Collaborator

The question here is if we shouldn't improve Simple Schema with this so that we have the same availability in minimongo.

@radekmie
Copy link
Collaborator

I believe it wouldn't make sense to use SimpleSchema for that as the validator can include a $jsonSchema operator. In this case, I'd rather think about an ajv wrapper for that instead. However, we shouldn't start designing it before it's available in a prerelease - AFAIK the error format is not yet specified.

@StorytellerCZ StorytellerCZ added the in-discussion We are still discussing how to solve or implement it label Mar 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in-discussion We are still discussing how to solve or implement it Project:Minimongo Project:Mongo Driver
Projects
None yet
Development

No branches or pull requests

3 participants