# openapi-schema

> A JSON Schema for OpenAPI Specification.

Latest version **1.0.0** (published 2018-04-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install openapi-schema
pnpm add openapi-schema
yarn add openapi-schema
bun add openapi-schema
```

## 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 | 1.0.0 |
| Published | 2018-04-23 |
| First published | 2018-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 50.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Borys Ponomarenko |
| Maintainers | bponomarenko |
| Keywords | openapi, json-schema, schema, oas |

## Links

- npm: https://www.npmjs.com/package/openapi-schema
- Repository: https://github.com/bponomarenko/openapi-schema
- Homepage: https://github.com/bponomarenko/openapi-schema#readme
- Issues: https://github.com/bponomarenko/openapi-schema/issues
- npm.io page: https://npm.io/package/openapi-schema

## 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

- 1.0.0 (latest) — 2018-04-23

## README

# openapi-schema

A JSON Schema for OpenAPI Specification. Supports version [3.0.1](https://github.com/OAI/OpenAPI-Specification/blob/master//versions/3.0.1.md).

## Install via NPM

```shell
npm install --save openapi-schema
```

## Usage

Example of OpenAPI specification validation with "[ajv](https://www.npmjs.com/package/ajv)" NPM package:

```javascript
const Ajv = require('ajv');
const schema = require('openapi-schema');

const ajv = new Ajv();
ajv.validate(schema, {
  openapi: '3.0.1',
  info: {
    title: 'Test spec',
    version: '1.0.0'
  }
});
```

## Missing requirements
* [Parameter Object](https://github.com/OAI/OpenAPI-Specification/blob/master//versions/3.0.1.md#parameterObject):
  "explode" – When style is form, the default value is true.
* [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master//versions/3.0.1.md#schemaObject):
  "items" – items MUST be present if the type is array.

## License

MIT

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