Menu

Web API discoverability using Swagger

With many web APIs laying around, no one can possibly remember all the endpoints, parameters and return data.

This is where the Web API Help page comes into picture, otherwise you will just have to open the Web API project, whenever you need to find more information about a particular endpoint, That is just a waste of time.  You can use Swagger for this there is a nice nuget called “Swashbuckle” by Richard Morris – Thank you.

Install-Package Swashbuckle -Pre

open your Startup.cs and add below to your ConfigureServices section

and add below to your Configure section

And API documentation will be generated on http://localhost:49875/swagger/ui/index.html – Sweet.

 

 

Leave a comment