npm install @pr0da/json-schema-loader
Enchanced json loader for webpack, which handles json schema references ($ref). The loader uses json-schema-ref-parser to resolve references.
Additionally the loader can merger subschemas given by allOf.
var dummySchema = require('json-schema!./root.json');
// => returns file.json content as json parsed object with resolved $ref's- mergeAllOf: Optional parameter to merge subschemas given by the
allOfkeyword.- E.g.:
json-schema?mergeAllOf=true!./root.json - Default:
false;
- E.g.: