appendix-b

Appendix B. Installing API linting and OpenAPI diff tools

 

This appendix guides you through installing the tools you need to run the examples in this book. To test your setup of the tools, check out the book’s code repository at https://github.com/apiopsbook/apiops and navigate to the appendix folder.

B.1 Installing Node.js

Node.js is an open-source JavaScript runtime environment that runs on the V8 JavaScript engine outside the browser. npm is the standard package manager for Node.js and is included with the Node.js installation. To install Node.js, download and run an installer package for your operating system from https://nodejs.dev/en/download/. You can verify your Node.js installation by running the following commands in your terminal:

node -v
npm -v

B.2 Installing Spectral

Spectral (https://github.com/stoplightio/spectral) is a JSON and YAML linter for OpenAPI and AsyncAPI definition files. You can install Spectral using npm:

$ npm install -g @stoplight/spectral-cli 

For other methods of installing Spectral using Yarn, Docker or native binaries, see the Stoplight website https://docs.stoplight.io/docs/spectral/b8391e051b7d8-installation.

B.3 Installing Visual Studio Code

B.4 Installing Spectral Visual Studio Code plugins

B.5 Installing the 42Crunch OpenAPI (Swagger) Editor

B.6 Installing jq and yq

B.7 Installing jpp

B.8 Installing Tufin/oasdiff

B.9 Installing swagger-ui-cli