{"_id":"@nesto-software/json-schema-ref-parser","_rev":"4-7be27843e81869ce856fd0c5561b032f","name":"@nesto-software/json-schema-ref-parser","dist-tags":{"latest":"9.0.10"},"versions":{"9.0.10":{"name":"@nesto-software/json-schema-ref-parser","version":"9.0.10","keywords":["json","schema","jsonschema","json-schema","json-pointer","$ref","dereference","resolve"],"author":{"url":"https://jamesmessinger.com","name":"James Messinger"},"license":"MIT","_id":"@nesto-software/json-schema-ref-parser@9.0.10","maintainers":[{"name":"martinloeper","email":"martin.loeper@nesto-software.de"},{"name":"opalmo","email":"felix.kaiser@nesto-software.de"},{"name":"arkraft","email":"artur.kraft@nesto-software.de"}],"contributors":[{"name":"Boris Cherny","email":"boris@performancejs.com"},{"name":"Jakub Rożek","email":"jakub@stoplight.io"}],"homepage":"https://apitools.dev/json-schema-ref-parser/","bugs":{"url":"https://github.com/APIDevTools/json-schema-ref-parser/issues"},"dist":{"shasum":"5cf2d72e4e71b302f3fbf6cae8689f087bc9a56b","tarball":"https://registry.npmjs.org/@nesto-software/json-schema-ref-parser/-/json-schema-ref-parser-9.0.10.tgz","fileCount":24,"integrity":"sha512-4cWm8yyxGw6LM7L8EZ+vqDqff8jkP0IOykoGGKTGGvjonqiFSG3lnhJ3YsvjKwc0grHQQ8Db7trZ53m5LKvuww==","signatures":[{"sig":"MEUCIQDNnnk7iqy1Bek05O19taT+6lPMPTkvuRJAg3yRBSu7xgIgM9VMjKjrvrkI6uQzGbbhWWSSD+u5S9dukZmLvrnUvrw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":151727,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRPZrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVig//djFpxAagvy3Xav5HLTw2Yf9qxcsUk393j9QGQmGUdoqXL1FG\r\nKnAsvPZsO/La4FY41o4DIjA8LUd1VQXLOiXlYMw9fNlDcHNBwsL3yubOQCdI\r\nBVrpZfbDlgyG39eI9A8V6VnGZDL/2pvTeEwUWZFo3xsWD0sgDEhCnOB4g20T\r\nrQZ7MjYxhvYQgb+FVS3jzsOLMw8N/Cu/ct7Evkt2XmpW+zzRONZRUCdM0T+o\r\nCCGq2kmDzuUvmVkr6I0VIms/NSiaYO0jhPKhM+5MbFo6d46zZK0Lb6p0b/3F\r\n6nlBbjli31n2X9nNMjOAjywQCng1tgTe8aR3mWn3MZi5kjxKiER4HkMFvD3N\r\nm/jJ9KDolu4FX4JCkSxQd3b6UPFOBZR6Kch6lnVlTx/5fpUYdKMMLvbGJm95\r\nXBOjLtfXhNs9L7cJ83QPqvGoRAR5E6hHOBTrsL7iPl32ygfKWMOjPvqQrQLb\r\npuFqLEu8Bqr7I/Tq8TO5T6MFD8de4CZsOxqTcHSIPyJiWaZrAYTSEJ56J+sH\r\nQXAgbP84aVyDMG35TVYTAm8HHi8INsjxXe2wFVqyezVtVXcfVmTVTPVnNp+y\r\n5cVkR8F1wPMcSqQZbWKBVPbwDijfMeEF0rU4vr8Ge4/gk/RlIQ7aZbmo6Hfh\r\ndtZJzo0A6GCBDomEc257Z+u4TpQXLcZATYw=\r\n=puD4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","browser":{"fs":false},"gitHead":"78f2cc40b8b54e6f74f33e8b4ce9b6aae72f154f","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["semantic-release-plugin-update-version-in-files",{"files":["dist/package.json"],"placeholder":"X.X.X"}],["@amanda-mitchell/semantic-release-npm-multiple",{"registries":{"scoped":{"pkgRoot":"."},"unscoped":{"pkgRoot":"dist"}}}],"@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint lib test/fixtures test/specs","test":"npm run test:node && npm run test:typescript && npm run test:browser && npm run lint","build":"cp LICENSE *.md dist","clean":"shx rm -rf .nyc_output coverage","upgrade":"npm-check -u && npm audit fix","coverage":"npm run coverage:node && npm run coverage:browser","test:node":"mocha","test:browser":"karma start --single-run","coverage:node":"nyc node_modules/mocha/bin/mocha","test:typescript":"tsc --noEmit --strict --lib esnext,dom test/specs/typescript-definition.spec.ts","coverage:browser":"npm run test:browser -- --coverage"},"typings":"lib/index.d.ts","_npmUser":{"name":"martinloeper","email":"martin.loeper@nesto-software.de"},"repository":{"url":"git+https://github.com/APIDevTools/json-schema-ref-parser.git","type":"git"},"_npmVersion":"6.14.15","description":"Parse, Resolve, and Dereference JSON Schema $ref pointers","directories":{},"_nodeVersion":"14.19.1","dependencies":{"js-yaml":"^4.1.0","call-me-maybe":"^1.0.1","@jsdevtools/ono":"^7.1.3","@types/json-schema":"^7.0.6"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.1","shx":"^0.3.2","chai":"^4.2.0","karma":"^5.0.2","mocha":"^8.2.1","eslint":"^7.18.0","karma-cli":"^2.0.0","npm-check":"^5.9.0","typescript":"^4.0.5","@types/node":"^14.14.21","chai-subset":"^1.6.0","@babel/polyfill":"^7.12.1","@jsdevtools/karma-config":"^3.1.7","@jsdevtools/eslint-config":"^1.0.7","@jsdevtools/host-environment":"^2.1.2","@amanda-mitchell/semantic-release-npm-multiple":"^2.5.0","semantic-release-plugin-update-version-in-files":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/json-schema-ref-parser_9.0.10_1648686698944_0.6335665099363792","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-03-31T00:31:38.883Z","modified":"2026-01-26T18:38:06.881Z","9.0.10":"2022-03-31T00:31:39.147Z"},"bugs":{"url":"https://github.com/APIDevTools/json-schema-ref-parser/issues"},"author":{"url":"https://jamesmessinger.com","name":"James Messinger"},"license":"MIT","homepage":"https://apitools.dev/json-schema-ref-parser/","keywords":["json","schema","jsonschema","json-schema","json-pointer","$ref","dereference","resolve"],"repository":{"url":"git+https://github.com/APIDevTools/json-schema-ref-parser.git","type":"git"},"description":"Parse, Resolve, and Dereference JSON Schema $ref pointers","contributors":[{"name":"Boris Cherny","email":"boris@performancejs.com"},{"name":"Jakub Rożek","email":"jakub@stoplight.io"}],"maintainers":[{"email":"martin.loeper@nesto-software.de","name":"martinloeper"},{"email":"sinan.birbalta@nesto-software.de","name":"nesto-sinbalta"},{"email":"stefan.trauth@nesto-software.de","name":"stefan.trauth"}],"readme":"JSON Schema $Ref Parser\n============================\n#### Parse, Resolve, and Dereference JSON Schema $ref pointers\n\n[![Build Status](https://github.com/APIDevTools/json-schema-ref-parser/workflows/CI-CD/badge.svg?branch=master)](https://github.com/APIDevTools/json-schema-ref-parser/actions)\n[![Coverage Status](https://coveralls.io/repos/github/APIDevTools/json-schema-ref-parser/badge.svg?branch=master)](https://coveralls.io/github/APIDevTools/json-schema-ref-parser)\n\n[![npm](https://img.shields.io/npm/v/@apidevtools/json-schema-ref-parser.svg)](https://www.npmjs.com/package/@apidevtools/json-schema-ref-parser)\n[![Dependencies](https://david-dm.org/APIDevTools/json-schema-ref-parser.svg)](https://david-dm.org/APIDevTools/json-schema-ref-parser)\n[![License](https://img.shields.io/npm/l/@apidevtools/json-schema-ref-parser.svg)](LICENSE)\n[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/APIDevTools/json-schema-ref-parser)\n\n\n[![OS and Browser Compatibility](https://apitools.dev/img/badges/ci-badges-with-ie.svg)](https://github.com/APIDevTools/json-schema-ref-parser/actions)\n\n\nThe Problem:\n--------------------------\nYou've got a JSON Schema with `$ref` pointers to other files and/or URLs.  Maybe you know all the referenced files ahead of time.  Maybe you don't.  Maybe some are local files, and others are remote URLs.  Maybe they are a mix of JSON and YAML format.  Maybe some of the files contain cross-references to each other.\n\n```javascript\n{\n  \"definitions\": {\n    \"person\": {\n      // references an external file\n      \"$ref\": \"schemas/people/Bruce-Wayne.json\"\n    },\n    \"place\": {\n      // references a sub-schema in an external file\n      \"$ref\": \"schemas/places.yaml#/definitions/Gotham-City\"\n    },\n    \"thing\": {\n      // references a URL\n      \"$ref\": \"http://wayne-enterprises.com/things/batmobile\"\n    },\n    \"color\": {\n      // references a value in an external file via an internal reference\n      \"$ref\": \"#/definitions/thing/properties/colors/black-as-the-night\"\n    }\n  }\n}\n```\n\n\nThe Solution:\n--------------------------\nJSON Schema $Ref Parser is a full [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and [JSON Pointer](https://tools.ietf.org/html/rfc6901) implementation that crawls even the most complex [JSON Schemas](http://json-schema.org/latest/json-schema-core.html) and gives you simple, straightforward JavaScript objects.\n\n- Use **JSON** or **YAML** schemas &mdash; or even a mix of both!\n- Supports `$ref` pointers to external files and URLs, as well as [custom sources](https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html) such as databases\n- Can [bundle](https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#bundlepath-options-callback) multiple files into a single schema that only has _internal_ `$ref` pointers\n- Can [dereference](https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#dereferencepath-options-callback) your schema, producing a plain-old JavaScript object that's easy to work with\n- Supports [circular references](https://apitools.dev/json-schema-ref-parser/docs/#circular-refs), nested references, back-references, and cross-references between files\n- Maintains object reference equality &mdash; `$ref` pointers to the same value always resolve to the same object instance\n- Tested in Node v10, v12, & v14, and all major web browsers on Windows, Mac, and Linux\n\n\nExample\n--------------------------\n\n```javascript\n$RefParser.dereference(mySchema, (err, schema) => {\n  if (err) {\n    console.error(err);\n  }\n  else {\n    // `schema` is just a normal JavaScript object that contains your entire JSON Schema,\n    // including referenced files, combined into a single object\n    console.log(schema.definitions.person.properties.firstName);\n  }\n})\n```\n\nOr use `async`/`await` syntax instead. The following example is the same as above:\n\n```javascript\ntry {\n  let schema = await $RefParser.dereference(mySchema);\n  console.log(schema.definitions.person.properties.firstName);\n}\ncatch(err) {\n  console.error(err);\n}\n```\n\nFor more detailed examples, please see the [API Documentation](https://apitools.dev/json-schema-ref-parser/docs/)\n\n\n\nInstallation\n--------------------------\nInstall using [npm](https://docs.npmjs.com/about-npm/):\n\n```bash\nnpm install @apidevtools/json-schema-ref-parser\n```\n\n\n\nUsage\n--------------------------\nWhen using JSON Schema $Ref Parser in Node.js apps, you'll probably want to use **CommonJS** syntax:\n\n```javascript\nconst $RefParser = require(\"@apidevtools/json-schema-ref-parser\");\n```\n\nWhen using a transpiler such as [Babel](https://babeljs.io/) or [TypeScript](https://www.typescriptlang.org/), or a bundler such as [Webpack](https://webpack.js.org/) or [Rollup](https://rollupjs.org/), you can use **ECMAScript modules** syntax instead:\n\n```javascript\nimport $RefParser from \"@apidevtools/json-schema-ref-parser\";\n```\n\n\n\nBrowser support\n--------------------------\nJSON Schema $Ref Parser supports recent versions of every major web browser.  Older browsers may require [Babel](https://babeljs.io/) and/or [polyfills](https://babeljs.io/docs/en/next/babel-polyfill).\n\nTo use JSON Schema $Ref Parser in a browser, you'll need to use a bundling tool such as [Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/), [Parcel](https://parceljs.org/), or [Browserify](http://browserify.org/). Some bundlers may require a bit of configuration, such as setting `browser: true` in [rollup-plugin-resolve](https://github.com/rollup/rollup-plugin-node-resolve).\n\n\n\nAPI Documentation\n--------------------------\nFull API documentation is available [right here](https://apitools.dev/json-schema-ref-parser/docs/)\n\n\n\nContributing\n--------------------------\nI welcome any contributions, enhancements, and bug-fixes.  [Open an issue](https://github.com/APIDevTools/json-schema-ref-parser/issues) on GitHub and [submit a pull request](https://github.com/APIDevTools/json-schema-ref-parser/pulls).\n\n#### Building/Testing\nTo build/test the project locally on your computer:\n\n1. __Clone this repo__<br>\n`git clone https://github.com/APIDevTools/json-schema-ref-parser.git`\n\n2. __Install dependencies__<br>\n`npm install`\n\n3. __Run the tests__<br>\n`npm test`\n\n\n\nLicense\n--------------------------\nJSON Schema $Ref Parser is 100% free and open-source, under the [MIT license](LICENSE). Use it however you want.\n\nThis package is [Treeware](http://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/APIDevTools/json-schema-ref-parser) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.\n\n\n\nBig Thanks To\n--------------------------\nThanks to these awesome companies for their support of Open Source developers ❤\n\n[![Stoplight](https://svgshare.com/i/TK5.svg)](https://stoplight.io/?utm_source=github&utm_medium=readme&utm_campaign=json_schema_ref_parser)\n[![SauceLabs](https://jstools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)\n[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n","readmeFilename":"README.md"}