🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@apidevtools/json-schema-ref-parser

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apidevtools/json-schema-ref-parser

Parse, Resolve, and Dereference JSON Schema $ref pointers

14.0.3
latest
Source
npm
Version published
Weekly downloads
5.3M
-9.37%
Maintainers
2
Weekly downloads
 
Created

What is @apidevtools/json-schema-ref-parser?

The @apidevtools/json-schema-ref-parser package is a powerful tool for working with JSON Schemas. It allows users to parse JSON Schemas, resolve all $ref pointers to their corresponding values, and can bundle multiple files into a single schema. This package is particularly useful for developers working with complex JSON Schemas that include multiple references to other schemas or definitions.

What are @apidevtools/json-schema-ref-parser's main functionalities?

Dereferencing JSON Schemas

This feature allows you to take a JSON Schema that contains $ref pointers and resolve all references, resulting in a fully dereferenced schema. This is useful for understanding and validating the full structure of a schema without having to manually follow references.

{"const parser = require('@apidevtools/json-schema-ref-parser');\n\nlet schema = {\n  $ref: 'http://example.com/my-schema.json'\n};\n\nparser.dereference(schema).then(function(schema) {\n  console.log('Schema:', schema);\n}).catch(function(err) {\n  console.error(err);\n});"}

Bundling JSON Schemas

This feature bundles a JSON Schema and all its references into a single schema file. This is particularly useful for distribution or for loading a schema into tools that do not support $ref pointers.

{"const parser = require('@apidevtools/json-schema-ref-parser');\n\nlet schema = {\n  $ref: 'http://example.com/my-schema.json'\n};\n\nparser.bundle(schema).then(function(schema) {\n  console.log('Bundled schema:', schema);\n}).catch(function(err) {\n  console.error(err);\n});"}

Other packages similar to @apidevtools/json-schema-ref-parser

Keywords

json

FAQs

Package last updated on 30 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts