Codewind OpenAPI Tools for VS Code

The Codewind OpenAPI Tools for VS Code provides commands that invoke the OpenAPI Generator to create API clients, server stubs, and HTML documentation from OpenAPI definitions. The tools are integrated and customized to work with Codewind for VS Code, but they can also work without the Codewind extension.

Prerequisites

  • Install Docker before you run the generator. In VS Code, the plug-in pulls in the OpenAPI generator image from Docker.

Installing

  1. Install VS Code version 1.27 or later.
  2. (OPTIONAL) Install Codewind for VS Code from the VS Code Marketplace or by searching for Codewind in the VS Code Extensions view.
  3. This extension pulls the OpenAPI Generator CLI Docker Image and runs the OpenAPI Generator in a Docker container. Install Docker if necessary.

Running commands

  1. Before you run a command, ensure the OpenAPI definition is in the folder or project.
  2. If you have Codewind installed, go to the Explorer view group and open the Codewind view.
    • Access the context menu commands from the Codewind view, go to the context menu on a project and select one of the Generate actions.
  3. The commands are also available from the Command Palette .
  4. After you generate code, edit the .openapi-generator-ignore file to ensure that subsequent code generation does not overwrite custom code.

Generator options

The following command line equivalent options are available for client and server generation: -i <OpenAPI definition> -g <generator name> -o <output directory>

The following command line equivalent options are available for HTML generation: -i <OpenAPI definition> -g html2 -o <output directory>

Features