open-index/open-npm huggingface dataset:
npm package: @pca-experimental/ibm-openapi-validator
Description: Configurable and extensible validator/linter for OpenAPI documents
Latest version: 0.2.0

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

Detailed usage information for the validator can be found [here](../../README.md).
npm package: @pca-experimental/openapi-ruleset
Description: Spectral ruleset for validating IBM Cloud services
Latest version: 0.2.0

# 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);
}
```
npm package: @pca-experimental/openapi-ruleset-utilities
Description: Programmatic utility functions for creating Spectral-formatted OpenAPI Rulesets
Latest version: 0.0.4

# OpenAPI Ruleset Utilities
This package contains a number of JS functions that may be useful in developing a custom Spectral ruleset for validating OpenAPI documents.

## Installation

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

## Usage

Documentation coming soon.