@stoplight/json-ref-readers
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

json-ref-readers

Set of utilities for reading external json references.

Installation

yarn add @stoplight/json-ref-readers

Usage

The library exports two functions: resolveHttp and resolveFile. Both take uri.URI and resolve to a string containing requested resource.

import { Resolver } from '@stoplight/json-ref-resolver';
import { resolveFile, resolveHttp } from '@stoplight/json-ref-readers';

const httpAndFileResolver = new Resolver({
  resolvers: {
    https: { resolve: resolveHttp },
    http: { resolve: resolveHttp },
    file: { resolve: resolveFile },
  },
});

Readme

Keywords

none

Package Sidebar

Install

npm i @stoplight/json-ref-readers

Weekly Downloads

540,415

Version

1.2.2

License

Apache-2.0

Unpacked Size

16.1 kB

Total Files

12

Last publish

Collaborators

  • stoplight-devops