# oas-resolver

> Resolve external $refs in OpenAPI (swagger) 2.0 / 3.x definitions

Latest version **2.5.6** (published 2021-07-07) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install oas-resolver
pnpm add oas-resolver
yarn add oas-resolver
bun add oas-resolver
```

Provides the command `resolve`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.5.6 |
| Published | 2021-07-07 |
| First published | 2018-06-27 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 27.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 747 |
| Author | Mike Ralphson |
| Maintainers | mermade |
| Keywords | openapi, swagger, oas, resolver, resolution, ref, json-pointer, json-ref |

## Links

- npm: https://www.npmjs.com/package/oas-resolver
- Repository: https://github.com/Mermade/oas-kit
- Homepage: https://github.com/Mermade/oas-kit#readme
- Issues: https://github.com/mermade/oas-kit/issues
- Funding: https://github.com/Mermade/oas-kit?sponsor=1
- npm.io page: https://npm.io/package/oas-resolver

## Dependencies (5)

- [yaml](https://npm.io/package/yaml.md) ^1.10.0
- [yargs](https://npm.io/package/yargs.md) ^17.0.1
- [reftools](https://npm.io/package/reftools.md) ^1.1.9
- [node-fetch-h2](https://npm.io/package/node-fetch-h2.md) ^2.3.0
- [oas-kit-common](https://npm.io/package/oas-kit-common.md) ^1.0.8

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 2.5.6 (latest) — 2021-07-07
- 2.5.5 — 2021-05-31
- 2.5.4 — 2021-01-24
- 2.5.3 — 2020-11-20
- 2.5.2 — 2020-10-14
- 2.5.1 — 2020-09-22
- 2.5.0 — 2020-09-18
- 2.4.4 — 2020-09-02
- 2.4.3 — 2020-08-12
- 2.4.2 — 2020-07-31
- 2.4.1 — 2020-07-13
- 2.4.0 — 2020-07-08
- 2.3.2 — 2020-03-31
- 2.3.1 — 2020-03-29
- 2.3.0 — 2020-03-23
- … 24 more at https://npm.io/package/oas-resolver/versions

## README

# oas-resolver

## Usage

```js
const yaml = require('yaml');
const input = yaml.parse(str);
const source = url; // or filename
resolver.resolve(input,source,options)
.then(function(options){
  fs.writeFileSync(outputFile,yaml.stringify(options.openapi),'utf8');
})
.catch(function(ex){
  // ...
});
```

See here for complete [documentation](/docs/options.md) of the `options` object.

---
_Source: https://npm.io/package/oas-resolver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
