Skip to content

AspNetCoreToSwaggerCommand

Rico Suter edited this page Nov 5, 2018 · 4 revisions

Either provide a Project or Assembly with an ASP.NET Core Startup class.

We recommend to not use any settings beside assembly/project settings and specify one of the documents which are added with AddSwaggerDocument(document => document.DocumentName = "v1") and configure the document in your app.

Then generate the document via CLI:

aspnetcore2swagger /assembly:MyAspNetCoreApp.dll /documentName:v1 /output:swagger.json

The command uses the AspNetCoreToSwaggerGenerator.

Important for .NET Core: Assembly loading.

You can’t perform that action at this time.