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

preview_player
Показать описание
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.

📖 Learn .NET and C# with our online courses 📖

#aspnetcore #swagger #webapi
Рекомендации по теме
Комментарии
Автор

Thanks a lot David! You really simplified adding Swagger and made it very easy to understand.

UNSCODST
Автор

Thank you for introducing me to swagger. I almost never load bulky postman anymore. Not only does it simply execute api, now instead of me making the url for api for postman swagger generates them for me to put into my code. This is Inversion of code development (IoCD) Keep the videos coming.

charles-yzc
Автор

Awesome video. My only nit is the solution browser is too wide so that it covers up a lot of screen space! Another note is that now needs to add .Name to the end, otherwise it would cause several exceptions.

Louis-doet
Автор

Well done, although would have been nice if your resolution was a bit higher so we can see full lines and not have to scroll back in video to see content.

rogertheorangecat
join shbcf.ru