IDE Extensions

The set of extensions that integrates the API-design essential tools into their everyday work.


Table of contents

  1. Summary
  2. SPA deployment
  3. Installation
    1. VSCode
    2. IntelliJ


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!

Check the repository!

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:

  1. Clone this repository:

     git clone git@github.com:InditexTech/api-scoring-ide-plugins.git
    
  2. Navigate to the SPA directory:

     cd plugins/spa-apiscoringviewer
    
  3. Install dependencies:

     npm install --global pnpm
     pnpm install
    
  4. 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

  1. Clone the repository:

     git clone git@github.com:InditexTech/api-scoring-ide-plugins.git
    
  2. Install VSCE by following the official documentation documentation, or use the command below::

     npm install --global @vscode/vsce
    
  3. Navigate to plugins/vscode-apiscoring/code folder and run the following commands:

     npm install
     vsce package
    
  4. The previous step will generate a .vsix file in the directory. Use this file to install the extension in VSCode.

IntelliJ

  1. Clone the repository:

     git clone git@github.com:InditexTech/api-scoring-ide-plugins.git
    
  2. Build the plugin from plugins/intellij-apiscoring/code:

     ./gradlew build
    

Table of contents