1.15.9 • Published 27 days ago

@ibm-cloud/openapi-ruleset v1.15.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
27 days ago

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 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.
# .spectral.yaml
extends: '@ibm-cloud/openapi-ruleset'
rules:
  content-entry-provided: off

Spectral config file - JavaScript

// .spectral.js
const ibmOpenapiRuleset = require('@ibm-cloud/openapi-ruleset');

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

Programmatically running Spectral

// 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);
}
1.15.9

27 days ago

1.15.8

30 days ago

1.15.7

1 month ago

1.15.6

1 month ago

1.15.5

1 month ago

1.15.4

2 months ago

1.15.3

2 months ago

1.15.2

3 months ago

1.15.0

3 months ago

1.15.1

3 months ago

1.14.1

7 months ago

1.2.0

9 months ago

1.14.0

7 months ago

1.14.2

7 months ago

1.6.3

9 months ago

1.6.2

9 months ago

1.6.1

9 months ago

1.6.0

9 months ago

1.9.0

8 months ago

1.5.0

9 months ago

1.10.0

7 months ago

1.12.0

7 months ago

1.8.0

8 months ago

1.4.1

9 months ago

1.4.0

9 months ago

1.11.0

7 months ago

1.13.0

7 months ago

1.7.0

8 months ago

1.3.0

9 months ago

1.0.2

1 year ago

1.0.4

12 months ago

1.0.3

12 months ago

1.1.1

11 months ago

1.1.0

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.0-rc.3

1 year ago

1.0.0-rc.1

1 year ago

1.0.0-rc.2

1 year ago

0.45.5

1 year ago

0.45.4

1 year ago

0.44.4

1 year ago

0.44.3

1 year ago

0.45.3

1 year ago

0.45.1

1 year ago

0.45.2

1 year ago

0.45.0

1 year ago

0.44.2

2 years ago

0.44.1

2 years ago

0.43.0

2 years ago

0.41.0

2 years ago

0.38.0

2 years ago

0.44.0

2 years ago

0.42.0

2 years ago

0.40.0

2 years ago

0.39.0

2 years ago

0.36.0

2 years ago

0.32.3

2 years ago

0.34.0

2 years ago

0.32.2

2 years ago

0.32.1

2 years ago

0.32.0

2 years ago

0.30.1

2 years ago

0.30.0

2 years ago

0.37.3

2 years ago

0.37.2

2 years ago

0.37.1

2 years ago

0.37.0

2 years ago

0.35.0

2 years ago

0.33.2

2 years ago

0.33.1

2 years ago

0.33.0

2 years ago

0.31.1

2 years ago

0.31.0

2 years ago

0.29.0

2 years ago

0.28.0

2 years ago

0.27.0

2 years ago

0.26.1

2 years ago

0.25.2

2 years ago

0.26.0

2 years ago

0.25.1

2 years ago

0.25.0

2 years ago

0.21.0

2 years ago

0.20.0

2 years ago

0.19.0

2 years ago

0.11.0

2 years ago

0.12.0

2 years ago

0.11.1

2 years ago

0.13.0

2 years ago

0.14.0

2 years ago

0.15.0

2 years ago

0.14.1

2 years ago

0.16.0

2 years ago

0.17.0

2 years ago

0.18.0

2 years ago

0.10.0

2 years ago

0.24.0

2 years ago

0.23.0

2 years ago

0.22.0

2 years ago

0.9.0

2 years ago

0.7.2

2 years ago

0.8.0

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.6.2

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago