Skip to content

Commit 798b53e

Browse files
committed
docs(ref-resolver): add README.md
1 parent a20d690 commit 798b53e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/ref-resolver/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# @stoplight/spectral-ref-resolver
2+
3+
This package provides Spectral-compatible bindings for [@stoplight/json-ref-resolver](https://github.com/stoplightio/json-ref-resolver) and [@stoplight/json-ref-readers](https://github.com/stoplightio/json-ref-readers).
4+
5+
You shouldn't need to install this package directly unless you want to create a custom JSON refs resolver
6+
7+
## Installation
8+
9+
```bash
10+
npm install --save @stoplight/spectral-ref-resolver
11+
12+
# OR
13+
14+
yarn add @stoplight/spectral-ref-resolver
15+
```
16+
17+
## Usage
18+
19+
An example usage of spectral-ref-resolver together with [proxy-agent](https://www.npmjs.com/package/proxy-agent).
20+
21+
```js
22+
import { createHttpAndFileResolver, Resolver } from '@stoplight/spectral-ref-resolver';
23+
import ProxyAgent from import('proxy-agent');
24+
25+
module.exports = createHttpAndFileResolver({ agent: new ProxyAgent(process.env.PROXY) });
26+
```

0 commit comments

Comments
 (0)