meteor / meteor-feature-requests

A tracker for Meteor issues that are requests for new functionality, not bugs.
Other
89 stars 3 forks source link

Upgrade MongoDB to support schema validation error messages #408

Open gunnartorfis opened 3 years ago

gunnartorfis commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

radekmie commented 3 years ago

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.