simple-json-schema-deref

Returns a JSON Schema with $ref's replaced with actual schemas

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
simple-json-schema-deref
0.1.09 years ago9 years agoMinified + gzip package size for simple-json-schema-deref in KB

Readme

json-schema-deref
Returns a JSON Schema with $ref's replaced with actual schemas

Get Started

Start by installing using a package manager or by grabbing the proper distribution:
$ npm install json-schema-deref
or
$ bower install json-schema-deref

Note: The main file for Bower defaults to the AngularJS version.

Use in NodeJS

var jsDeref = requrie('json-schema-deref');

var dereferencedSchema = jsDeref(schema);

Use in AngularJS

var myApp = angular.module('MyApp', ['jsonSchemaDeref']);

myApp.factory('myFactory', function (jsonSchemaDeref) {

  var schema = {
    type: 'object',
    ...
  };

  var dereferencedSchema = jsonSchemaDeref(schema);

});

Use in the browser

var jsDeref = window.JSON_SCHEMA_DEREF;

var dereferencedSchema = jsDeref(schema);

MIT License