# ibm-openapi-validator

> Configurable and extensible validator/linter for OpenAPI documents

Latest version **1.38.4** (published 2026-09-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install ibm-openapi-validator
pnpm add ibm-openapi-validator
yarn add ibm-openapi-validator
bun add ibm-openapi-validator
```

Provides the command `lint-openapi`.

## Health

**Score 63/100 (C)** — status: active.

Positive: has types package; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.38.4 |
| Published | 2026-09-18 |
| First published | 2018-10-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | separate (@types/ibm-openapi-validator) |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 18 |
| Unpacked size | 351.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 636 |
| Maintainers | dpopp07, ibm-devx-sdk |

## Links

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

## Dependencies (18)

- [ajv](https://npm.io/package/ajv.md) 8.20.0
- [pad](https://npm.io/package/pad.md) 2.3.0
- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [nimma](https://npm.io/package/nimma.md) 0.7.2
- [globby](https://npm.io/package/globby.md) 11.1.0
- [lodash](https://npm.io/package/lodash.md) 4.18.1
- [semver](https://npm.io/package/semver.md) 7.8.5
- [find-up](https://npm.io/package/find-up.md) 5.0.0
- [js-yaml](https://npm.io/package/js-yaml.md) 5.4.2
- [commander](https://npm.io/package/commander.md) 10.0.1
- [console-table-printer](https://npm.io/package/console-table-printer.md) 2.16.1
- [json-dup-key-validator](https://npm.io/package/json-dup-key-validator.md) 1.0.3
- [@stoplight/spectral-cli](https://npm.io/package/@stoplight/spectral-cli.md) 6.16.3
- [@stoplight/spectral-core](https://npm.io/package/@stoplight/spectral-core.md) 1.23.1
- [@ibm-cloud/openapi-ruleset](https://npm.io/package/@ibm-cloud/openapi-ruleset.md) 1.33.15
- [@stoplight/spectral-parsers](https://npm.io/package/@stoplight/spectral-parsers.md) 1.0.5
- [@stoplight/spectral-ref-resolver](https://npm.io/package/@stoplight/spectral-ref-resolver.md) 1.0.5
- [@ibm-cloud/openapi-ruleset-utilities](https://npm.io/package/@ibm-cloud/openapi-ruleset-utilities.md) 1.9.4

## Recent versions

- 1.38.4 (latest) — 2026-09-18
- 1.0.0-rc.3 (v1-rc) — 2023-03-28
- 1.38.3 — 2026-09-09
- 1.38.2 — 2026-08-03
- 1.38.1 — 2026-07-27
- 1.38.0 — 2026-07-24
- 1.37.18 — 2026-07-24
- 1.37.17 — 2026-07-23
- 1.37.16 — 2026-07-23
- 1.37.15 — 2026-07-03
- 1.37.14 — 2026-05-20
- 1.37.13 — 2026-05-07
- 1.37.12 — 2026-03-11
- 1.37.11 — 2026-02-19
- 1.37.10 — 2026-02-05
- … 299 more at https://npm.io/package/ibm-openapi-validator/versions

## README

# OpenAPI Validator
The IBM OpenAPI Validator lets you validate [OpenAPI 3.0.x](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md)
and [OpenAPI 3.1.x](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md) documents for compliance with the OpenAPI specifications, as well as IBM-defined best practices.

Note: this page displays abbreviated usage info for getting started. Visit [this page](../../README.md) for the full documentation.

## Installation
`npm install -g ibm-openapi-validator`

The `-g` flag installs the tool globally so that the validator can be run from anywhere in the file system. Alternatively, you can pass no flag or the `--save-dev` flag to add the validator as a dependency to your project and run it from your NPM scripts or JavaScript code.

## Usage
### Command Syntax
```bash
Usage: lint-openapi [options] [file...]

Run the validator on one or more OpenAPI 3.x documents

Options:
  -c, --config <file>            use configuration stored in <file> (*.json, *.yaml, *.js)
  -e, --errors-only              include only errors in the output and skip warnings (default is false)
  -i, --ignore <file>            avoid validating <file> (e.g. -i /dir1/ignore-file1.json --ignore /dir2/ignore-file2.yaml ...) (default is []) (default: [])
  -j, --json                     produce JSON output (default is text)
  -l, --log-level <loglevel>     set the log level for one or more loggers (e.g. -l root=info -l ibm-schema-description-exists=debug ...)  (default: [])
  -n, --no-colors                disable colorizing of the output (default is false)
  -r, --ruleset <file>           use Spectral ruleset contained in `<file>` ("default" forces use of default IBM Cloud Validation Ruleset)
  -s, --summary-only             include only the summary information and skip individual errors and warnings (default is false)
  -q, --impact-score             compute scores representing the API impact of rule violations and include with the results (default is false)
  -m, --markdown-report          generate a Markdown file with a report on all validator results (default is false)
  -w, --warnings-limit <number>  set warnings limit to <number> (default is -1)
  --version                      output the version number
  -h, --help                     display help for command
```
where `[file...]` is a space-separated list containing the filenames of one or more OpenAPI 3.x documents to be validated.

## Further Reading
Again, this page displays abbreviated information. The following links may be helpful:

- [Detailed information about the configuration options](../../README.md#configuration)
- [Detailed information about the default ruleset](../../docs/ibm-cloud-rules.md)
- [Detailed information about the `--impact-score` feature](../../docs/automated-quality-screening.md)

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