# @ibm-cloud/openapi-ruleset

> Spectral ruleset for validating IBM Cloud services

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

## Install

```sh
npm install @ibm-cloud/openapi-ruleset
pnpm add @ibm-cloud/openapi-ruleset
yarn add @ibm-cloud/openapi-ruleset
bun add @ibm-cloud/openapi-ruleset
```

## Health

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

Positive: no vulnerabilities; recently updated; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 1.33.15 |
| Published | 2026-09-18 |
| First published | 2021-12-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16.0.0 |
| Dependencies | 12 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 635 |
| Maintainers | ricellis, cloudant-sdks-automation, secrets.automation, nvenkatesh, dpittner_ibm, externaluse.sqlquery, ibm-reggie, ibm-devx-sdk, ibm-cloud-event-notifications, reggeenr, idsorg, wxai-sdk-automation, schmatic, codeengine-ui-team, stephaniegalang-ibm, mdarmawan, kmstagek, rajan.gahlout1, pyrooka, jeremy-johnson-ibm |

## Links

- npm: https://www.npmjs.com/package/@ibm-cloud/openapi-ruleset
- 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-cloud/openapi-ruleset

## Dependencies (12)

- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [lodash](https://npm.io/package/lodash.md) 4.18.1
- [loglevel](https://npm.io/package/loglevel.md) 1.9.2
- [inflected](https://npm.io/package/inflected.md) 2.1.0
- [minimatch](https://npm.io/package/minimatch.md) 10.2.6
- [validator](https://npm.io/package/validator.md) 13.15.35
- [jsonschema](https://npm.io/package/jsonschema.md) 1.5.0
- [loglevel-plugin-prefix](https://npm.io/package/loglevel-plugin-prefix.md) 0.8.4
- [@stoplight/spectral-formats](https://npm.io/package/@stoplight/spectral-formats.md) 1.8.5
- [@stoplight/spectral-rulesets](https://npm.io/package/@stoplight/spectral-rulesets.md) 1.22.7
- [@stoplight/spectral-functions](https://npm.io/package/@stoplight/spectral-functions.md) 1.10.5
- [@ibm-cloud/openapi-ruleset-utilities](https://npm.io/package/@ibm-cloud/openapi-ruleset-utilities.md) 1.9.4

## Recent versions

- 1.33.15 (latest) — 2026-09-18
- 1.0.0-rc.3 (v1-rc) — 2023-03-28
- 1.33.14 — 2026-09-09
- 1.33.13 — 2026-07-27
- 1.33.12 — 2026-07-23
- 1.33.11 — 2026-07-03
- 1.33.10 — 2026-05-20
- 1.33.9 — 2026-05-07
- 1.33.8 — 2026-03-11
- 1.33.7 — 2026-02-05
- 1.33.6 — 2026-01-23
- 1.33.5 — 2025-12-19
- 1.33.4 — 2025-11-28
- 1.33.3 — 2025-10-28
- 1.33.2 — 2025-10-27
- … 157 more at https://npm.io/package/@ibm-cloud/openapi-ruleset/versions

## README

# OpenAPI Ruleset
This package contains a custom Spectral ruleset for validating OpenAPI documents. It extends the `spectral:oas` ruleset, for which it defines custom severity levels. It also contains a number of additional rules based on API design requirements and guidance from IBM Cloud. This is the default ruleset used in the [`ibm-openapi-validator`](https://www.npmjs.com/package/ibm-openapi-validator) package.

## Installation

`npm install @ibm-cloud/openapi-ruleset`

Note that installation is only required if using this package programmatically or extending it in a Spectral config file written in JavaScript. It is not required if extending the ruleset in a Spectral config file written in YAML or JSON.

## Usage
### Spectral config file - YAML or JSON
* Note - no installation required. Spectral handles the import internally.

```yaml
# .spectral.yaml
extends: '@ibm-cloud/openapi-ruleset'
rules:
  content-entry-provided: off
```

### Spectral config file - JavaScript
```js
// .spectral.js
const ibmOpenapiRuleset = require('@ibm-cloud/openapi-ruleset');

module.exports = {
  extends: ibmOpenapiRuleset,
  rules: {
    'content-entry-provided': 'off'
  }
};
```

### Programmatically running Spectral
```js
// your-module.js
const ibmOpenapiRuleset = require('@ibm-cloud/openapi-ruleset');
const { Spectral } = require('@stoplight/spectral-core');

function async runSpectral(openapiDocument) {
  const spectral = new Spectral();
  spectral.setRuleset(ibmOpenapiRuleset);
  results = await spectral.run(openapiDocument);
  console.log(results);
}
```

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