The Eclipse Codewind tool for OpenAPI for VS Code provides commands that invoke the OpenAPI Generator to create API clients, server stubs, and HTML documentation from OpenAPI Specifications. The tools are integrated and customized to work with Codewind for VS Code, but they can also work without the Codewind extension. Codewind and the Codewind logo are trademarks of the Eclipse Foundation.
- Install VS Code version 1.27 or later.
- (OPTIONAL) Install Codewind for VS Code from the VS Code Marketplace or by searching for
Codewind
in the VS Code Extensions view. - This extension pulls the OpenAPI Generator CLI Docker Image and runs the OpenAPI Generator in a Docker container. Install Docker if necessary.
- Install the Eclipse Codewind tool for OpenAPI for VS Code extension from the VS Code Marketplace.
- Before you run a command, ensure the OpenAPI definition is in the folder or project.
- 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.
- The commands are also available from the Command Palette .
- Open the Command Palette and type
OpenAPI
to see the actions available.
- After you generate code, edit the
.openapi-generator-ignore
file to ensure that subsequent code generation does not overwrite custom code.
- Generate API clients in any of the supported languages/frameworks.
- Generate server stubs in any of the supported languages/frameworks.
- Generate HTML documentation from an OpenAPI definition file.