

services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" }); });
app.UseSwagger();
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); });REPORT THIS AD 4. Setup completed now run the project. we are ready to go.
your local port number will different than mine, use your port number with slash swagger.
Click on try it out, by giving expected request parameters you will get response in response body section.
In this article, we learned. How to use swagger with .NET core web Api’s.
Adding {{itemName}} to cart
Added {{itemName}} to cart