RunKit + npm: json-schema-ref-parser

node v6.17.1
endpointsharetweet
var parser = require("json-schema-ref-parser"); var schema = { properties: { foo: { $ref: '#/properties/foo' } } }; parser.dereference(schema, (err, obj) => { console.log( "Here's the fully-dereferenced JSON schema: " + JSON.stringify(obj, null, 2) ); if (obj.properties.foo === obj.properties.foo) { console.log("The JSON schema was fully dereferenced. 👍"); } else { console.warn("The JSON schema was NOT fully dereferenced. 👎"); } });
Created from: https://runkit.com/npm/json-schema-ref-parser
Loading…

no comments

    sign in to comment