Skip to content


Rico Suter edited this page Jun 10, 2019 · 1 revision

The WebApiToOpenApiCommand class generates a Swagger specification for a Web API controller which is loaded from an external .NET assembly.

The external assembly is loaded in a separate AppDomain so that there are no type collisions and the assembly can be correctly unloaded.

The generator uses the WebApiOpenApiDocumentGenerator generator to produce the Swagger specification.

More information about the Assembly loading.

This command is called by NSwagStudio and NSwag.exe (command line tool, NPM, NSwag.MSBuild) to load assemblies and generate Swagger specs (webapi2swagger command).