Plinth Swagger for ASP.NET CORE
$ dotnet add package Plinth.AspNetCore.SwaggerSwagger support for Plinth.AspNetCore
Example code for adding a swagger page to an ASP.NET Core application.
In ConfigureServices()
services.AddPlinthSwaggerGen(
new PlinthSwaggerOptions
{
ApiTitle = "AspNetCore Test API",
ApiDescription = "This is an API for Demonstrating an AspNetCore Web API",
ApiVersion = "v1",
ConfigureSwaggerInfo = i =>
{
i.TermsOfService = new Uri("https://myapp.com/tos.html");
}
}
);
In Configure()
app.UsePlinthSwaggerUI();