Prerequisites
Before you begin, ensure that you have the following:- Node.js installed on your system.
- Bruno installed.
Project Structure
The folder structure for this example will be:Configuration
You need to initializepackage.json file inside your collection.
Navigate to your Bruno collection directory in the terminal.
package.json file inside your collection.
Spectral Integration
In this example we’re using Spectral CLI ↗ as a npm package which help you to validate OpenSpec API YAML or JSON files with the built-in ruleset. You need to have OpenAPI JSON or YAML file to work with spectral or you can download from here ↗ as example.Spectral CLI Setup
You can installspectral-cli by running following command:
.spectral.yml file which is predefined ruleset.
copy
copy