Project

Swagger UI

Swagger UI is integrated to ASP.NET Zero but disabled by default. Swagger UI configuration is located in Startup class in the .Web project. You can enable it by just uncommenting the related lines:

In Startup.ConfigureServices method, enable the following line:

services.AddSwaggerGen();

And in Startup.Configure method, enable the following lines:

app.UseSwagger();
app.UseSwaggerUi();

You can browse swagger ui with this URL: "/swagger/ui".

Swagger UI

Thus, anyone (or any application) can explore, test and use the API easily.

In order to enable comments on Swagger UI, set Swagger:ShowSummaries to true in appsettings.json. After that, Swagger UI will show summaries written on your application services and controllers.

Contributors


Last updated: June 08, 2021 Edit this page on GitHub
In this document