REST API Client Code Generator
A collection of Visual Studio C# custom tool code generators for Swagger / OpenAPI specification files
The custom tool code generators piggy back on top of well known Open API client code generators like AutoRest, NSwag, OpenAPI Generator, and Swagger Codegen. These tools require NPM, AutoRest, and the Java SDK to be installed on the developers machine. Alternative Java SDK implementations such as the OpenJDK works fine with this extension. By default, the path to java.exe is read from the JAVA_HOME environment variable, but is also configurable in the Settings screen
The Swagger Codegen CLI and OpenAPI Generator are downloaded on demand but requires the Java SDK to be installed on the machine. This also means that using the SwaggerCodeGenerator and OpenApiCodeGenerator custom tools have a initial delay upon first time use. The generated code that these tools produce depends on the RestSharp v105.1.0 and JsonSubTypes v1.2.0 nuget packages.
The NSwag code generator produces code that depends on the Newtonsoft.Json nuget package.
This Visual Studio Extension will automatically add the required nuget packages that the generated code depends on
This extension will by default make some assumptions on the installation paths for Java, NSwag and NPM but also provides option pages for configuring this. The Swagger Codegen CLI and the OpenAPI Generator JAR files are by default downloaded to the user TEMP folder but it is also possible to specify to use existing JAR files
For tips and tricks on software development, check out my blog
If you find this useful and feel a bit generous then feel free to buy me a coffee :)