Adding Swagger in Asp.net core

We can add swagger using below steps :

  •       Add ‘Swashbuckle.AspNetCore’ in your .net core api project
  •      Add  AddSwaggerGen method on services in ConfigureServices method (startup class) as below

  •     Add app.UseSwagger() in Configure method on startup class.
  •     Add app.UseSwaggerUI() method (startup class)as below

Add a Comment

Your email address will not be published. Required fields are marked *