IDE Extensions
The set of extensions that integrates the API-design essential tools into their everyday work.
Table of contents
Summary
These set of extensions were built with a cooperation mindset between them: they increase the capabilities of each other, including markdownlint and Spectral.
The API hub provides the rating of the modules evaluated on the Scoring service, giving you real-time insights into what score to expect. For every rule broken, you can easily open the respective file/line on your IDE! And it works with Visual Studio Code and IntelliJ.
To work, the API hub uses an in-IDE-integrated SPA, that displays visual information about the broken rules and uses bidirectional communication with your API files.
In the VS Code, you can take advantage of the Spectral quick fix plugin to easily correct the linted errors. See in the previous gif how errors are corrected with a click!
For these tools to work, you must deploy the Scoring microservice: the main piece of the scoring system. Learn how in the Scoring service section.
SPA deployment
You need to have the SPA running so that the extensions are working seamlessly. To do so, you need to deploy the SPA locally with the following commands:
-
Clone this repository:
git clone git@github.com:InditexTech/api-scoring-ide-plugins.git
-
Navigate to the SPA directory:
cd plugins/spa-apiscoringviewer
-
Install dependencies:
npm install --global pnpm pnpm install
-
Once the process finishes, start the SPA:
pnpm start
If you need to remove all dependencies, you can use the following command:
pnpm clean
Installation
To install the extensions, follow the steps outlined below for each plugin.
VSCode
-
Clone the repository:
git clone git@github.com:InditexTech/api-scoring-ide-plugins.git
-
Install VSCE by following the official documentation documentation, or use the command below::
npm install --global @vscode/vsce
-
Navigate to
plugins/vscode-apiscoring/code
folder and run the following commands:npm install vsce package
-
The previous step will generate a
.vsix
file in the directory. Use this file to install the extension in VSCode.
IntelliJ
-
Clone the repository:
git clone git@github.com:InditexTech/api-scoring-ide-plugins.git
-
Build the plugin from
plugins/intellij-apiscoring/code
:./gradlew build