The Codewind OpenAPI Tools for VS Code provide commands that invoke the OpenAPI Generator to create API clients, server stubs, and HTML documentation from OpenAPI Specifications. The tools are integrated with and are customized to work with Codewind for VS Code but they can work standalone without the Codewind extension.
- Install VS Code version 1.27 or later.
- 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.
- To access the commands, navigate to the Explorer view group and open the Codewind view.
- Open the Command Palette and type "OpenAPI" to see the actions available.
- Or, to access the context menu commands, from the Codewind view, bring up the context menu on a project and select one of the Generate actions.
- Ensure the OpenAPI definition is in the folder/project prior to running the commands
- After generation, edit .openapi-generator-ignore to ensure 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.