Mid ASP.NET Core

How to enable OpenAPI / Swagger UI and customizing it?

  • Add Swashbuckle.AspNetCore NuGet package.
  • Configure Swagger services (builder.Services.AddSwaggerGen()).
  • Enable middleware (app.UseSwagger(), app.UseSwaggerUI()).
  • Customize with options like API info, document filters, UI themes.

More from ASP.NET Core Tutorial

All questions for this course