Aug 09

Swagger Codegen can be used to create client and server stubs in various languages for testing APIs as they are being developed. Swagger Codegen is a Java application and, evidently, requires Java 8 to run.

Once generated, server stubs can be run to provide the means of testing the API under development through the Swagger Codegen UI interface, which replicates the Swagger Editor API testing pane.

The article referred to in this post walks the reader through the process of creating a Swagger Codegen environment in Windows 10’s Windows Subsystem for Linux 2 Alpine Linux distribution. The environment includes the “automatic” stub generation script for NodeJS API stub server code and a stub server executor that re-generates and re-starts the stub server whenever the API under development is changed on disk. See https://github.com/mwczapski/Swagger_Codegen_3_Docker_Container/blob/master/create_swagger_codegen_in_wsl_alpine.md for the article.

preload preload preload