/ etherpad / src / node_modules / dereference-json-schema /

[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[   ]types.js4 days ago 81  
[TXT]types.d.ts4 days ago736  
[   ]resolveRef.js4 days ago1.5K 
[TXT]resolveRef.d.ts4 days ago202  
[   ]package.json4 days ago1.4K 
[   ]klona.js4 days ago1.1K 
[TXT]klona.d.ts4 days ago139  
[   ]index.js4 days ago548  
[TXT]index.d.ts4 days ago 86  
[   ]dereference.js4 days ago1.5K 
[TXT]dereference.d.ts4 days ago255  
[TXT]README.md4 days ago1.5K 
[   ]LICENSE4 days ago1.1K 
README.md

dereference-json-schema

CI npm version npm downloads bundle size License Buy me a coffee

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!

Apache/2.4.38 (Debian) Server at www.karls.computer Port 80