0.1.5 • Published 1 year ago

@hckrnews/openapi-dereference v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago