DEV Community

Sharad Aade
Sharad Aade

Posted on

SwaggerUI setup ASP.NET Core Web API

1) Select the ASP.NET Core Web API project template

2) Enable OpenAPI support

3) Install Swashbuckle.AspNetCore.SwaggerUI package from NuGet Package Manager

4) In the Properties > launchsettings.json file, enable and add
"launchBrowser": true,
"launchUrl": "swagger",

5) Configure in the program.cs
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/openapi/v1.json", "api");
});

6) That's all, run the project.

Thank you! (This is not a step you need to follow.)

Top comments (0)