We look to see how you can list and test all your endpoints in your ASP.NET Core Web API with Swagger.

This is a good alternative if you are used to using Postman to test out your ASP.NET Core Web API endpoints.

First, we will go ahead and install the Swashbucket.AspNetCore package into our ASP.NET Core Web API application. In addition, we will also add the necessary configuration changes to get the Swagger documentation working.

Next, we look at how we can change where the Swagger documentation is located in our application. Normally, Swagger is located at /swagger, but we look at moving it to root level.

Afterwards, we look at ways for adding comments to our endpoints in the Swagger documentation. Comments are good if you want more of an explanation as to what each endpoint does.

Finally, we look at ways to remove certain API endpoints from the Swagger documentation. This is beneficial if you want API endpoints to be hidden from view.

► More Information: https://www.roundthecode.com/dotnet/asp-net-core-web-api/test-your-endpoints-inside-your-asp-net-core-web-api-app-with-swagger

#aspnetcore #swagger #webapi #aspdotnet

Test Your Endpoints inside your ASP.NET Core Web API App with Swagger
4.60 GEEK