I've installed though nuget package manager
the Swashbuckle.AspNetCore.Swagger
and had included the using Swashbuckle.AspNetCore.Swagger
on the top, but I get error on the Info{ Title}
methods.
Can anyone please suggest how to solve this issue.
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new Info { Title = "My DAB API", Version = "V3.2.2" });
});
I find Solution.
For version 5
using Microsoft.OpenApi.Models;
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
});