[SERVER-17049] Allow $ref and $schema keywords to support JSON Schema management Created: 26/Jan/15  Updated: 05/Mar/18  Resolved: 26/Jan/15

Status: Closed
Project: Core Server
Component/s: JavaScript, Querying, Usability
Affects Version/s: 2.6.7, 3.0.0-rc6
Fix Version/s: None

Type: Improvement Priority: Trivial - P5
Reporter: Marcel Bennett Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-3536 templates for schemas Closed
Related
Participants:

 Description   

JSON Schema requires two fields to include the $ prefix.

First is the $schema keyword that defines the version and URI of the schema to be stored.

Second is the $ref used to describe pointers to additional schema data.

More info on JSON Schema is available here: http://json-schema.org/documentation.html

As JSON Schema is becoming a more heavily used tool for JSON data management

As JSON is requested for config file support SERVER-16819
And JSON Schema validation as well SERVER-3536

I see it as a useful exception to the no $ prefix error and it could even be useful to allow $ref resolution and caching in future (as a separate issue).



 Comments   
Comment by Marcel Bennett [ 27/Jan/15 ]

Ideally the $data keyword should also be allowed as that is being possibly added as part of JSON Schema draft 5.

$data is a Relative JSON Pointer and could potentially be required as such and an option to resolve references could be made available.

Comment by Marcel Bennett [ 26/Jan/15 ]

It's not a duplicate at all. Not even really a subset. That's why I created it.

SERVER-3536 is requesting validation of incoming data based on a template, this one is to allow a value that is a requirement of the JSON Schema format that I want to store and manage in Mongo regardless of any activity with regard to SERVER-3536.

The only way to store JSON Schema files 'as is' is to have this option. As it is now I cannot store a JSON Schema file without manipulating it first which is a major inhibitor to the purpose for which I want to use Mongo.

Comment by Ramon Fernandez Marina [ 26/Jan/15 ]

mbennett@uecomm.com.au, this ticket is a subset of SERVER-3536 so I'm marking it as a duplicate. I see you already posted there and you're watching the ticket (and that you're not the only one suggesting the use of JSON Schema), so feel free to vote for SERVER-3536 if you haven't done so already.

Regards,
Ramón.

Generated at Thu Feb 08 03:43:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.