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

Latest commit

 

History

History
19 lines (14 loc) · 516 Bytes

DEVELOPMENT.md

File metadata and controls

19 lines (14 loc) · 516 Bytes

Tips

Dereferencing schema

It's easier to work with the schema when you don't have to follow any links (such as #/definitions/person). You can do that as follows in Node.JS:

var deref = require('json-schema-deref-sync');
var fs = require('fs');

var schemaPath = "metadata/min metadata schema.json";

fs.readFile(schemaPath, 'utf8', function(error, contents) {
    var schema = JSON.parse(contents);
    var dereferenced = deref(schema);
    console.log(JSON.stringify(dereferenced));
});