[SERVER-48451] Enhance JSON Schema validation to support 2019-09 standard.... Created: 27/May/20 Updated: 05/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.0-rc7 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrzej Taramina | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Participants: | |||||||||
| Description |
|
MongoDB currently only supports the Draft-04 JSON Schema standard (with some omissions) for validation purposes. Draft-04 is pretty long in the tooth now. Please enhance JSON Schema validation to support the latest 2019-09 Draft of the standard, specifically including the ability to do conditional subschema validation (ie. if/then/else keyword support), which can be found here: https://json-schema.org/specification.html Mongoose provides good support for discriminators, where the structure of a document/subdocument depends on a type field (typically _type), as does Mongoid for subclasses. Validation of collections that use discriminators is not really possible without support for the if/then/else JSON Schema specification laid out in the most recent draft of the standard. |
| Comments |
| Comment by David Storch [ 28/May/20 ] |
|
ataramina@shorecg.com understood. Our team will triage this feature request and decide on its priority. |
| Comment by Andrzej Taramina [ 28/May/20 ] |
|
That is true....the if/then/else was just one of the major examples of what the latest JSON Schema draft standard provides. Would also like to see support for unevaluatedProperties and any other features that the latest standard provides. As such, this request is a superset of the if/then/else one.
|
| Comment by David Storch [ 28/May/20 ] |
|
Note that the particular request for if/then/else support in our JSON Schema implementation is already tracked by related ticket SERVER-42035. |
| Comment by Carl Champain (Inactive) [ 27/May/20 ] |
|
Thank you for the report. Kind regards, |