Package Exports
- dereference-json-schema
- dereference-json-schema/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dereference-json-schema) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
dereference-json-schema
Dereference $ref pointers in JSONSchema or OpenAPI documents.
Zero dependencies. Synchronous core. Handles circular refs.
Usage
npm i dereference-json-schema
import { dereferenceSync } from 'dereference-json-schema';
const schemaWithRefs = {
schemas: {
Person: {
type: 'object',
properties: {
name: {
$ref: '#/schemas/Name',
},
},
},
Name: {
type: 'string',
},
},
};
const schemaWithNoRefs = dereferenceSync(schemaWithRefs);
Contributing
dereference-json-schema is Free and Open Source Software. Issues and pull requests are more than welcome!