0.0.1 • Published 2 years ago

json-dereference v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

json-deref

This is a very basic library to dereference JSON objects. It supports both local and remote references, but only supports root references (relative referencing is not supported).

Example

import { dereference } from 'json-deref';

await dereference({
  obj: {
    value: {
      $ref: 'https://example.com/schema#/value',
    },
  },
}, {
  loadSchema: async (url) => ({
    value: 500,
  })
})