0.1.5 • Published 2 months ago

@hckrnews/openapi-dereference v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

OpenAPI dereference

NPM version Coverage Quality Gate Status Bugs Code Smells Technical Debt Vulnerabilities Maintainability Rating Reliability Rating Security Rating

Dereference $ref pointers in JSONSchema or OpenAPI documents.

Zero dependencies. Synchronous core. Handles circular refs.

Installation

npm install @hckrnews/openapi-dereference or yarn add @hckrnews/openapi-dereference

Test the package

npm run test or yarn test

How to use

npm i @hckrnews/openapi-dereference
import { dereferenceSync } from '@hckrnews/openapi-dereference';

const schemaWithRefs = {
  schemas: {
    Person: {
      type: 'object',
      properties: {
        name: {
          $ref: '#/schemas/Name',
        },
      },
    },
    Name: {
      type: 'string',
    },
  },
};

const schemaWithNoRefs = dereferenceSync(schemaWithRefs);
0.1.5

2 months ago

0.1.4

4 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago