-
Notifications
You must be signed in to change notification settings - Fork 2
define DB Schema #19
Description
When creating a new DB, Victor would like to specify a database schema. Including:
a) description
b) JSON Schema
In this case, we should save a new document (schema) into the database.
{
"description" : "favorite songs" ,
"json_schema" : <JSON_SCHEMA>
}
Neither description nor schema are mandatory.
Take a look at: https://github.com/travelping/jesse
Sample:
{
"$schema": "http://json-schema.org/draft-03/schema",
"id": "http://jsonschema.net",
"required": false,
"type": "object" ,
"properties": {
[-] "album" : {
"id": "http://jsonschema.net/album",
"required": false,
"type": "string"
},
[-] "author" : {
"id": "http://jsonschema.net/author",
"required": false,
"type": "string"
},
[-] "title" : {
"id": "http://jsonschema.net/title",
"required": false,
"type": "string"
},
[-] "year" : {
"id": "http://jsonschema.net/year",
"required": false,
"type": "string"
}
}
}