I've grouped my API endpoints into two tag/groups: "MCP Provider" and "Nexgen Provider". How can I apply a description to the tags themselves?
First make sure you have already installed the package: Swashbuckle.AspNetCore.Annotations, then adding the following codes in your .csproj file:
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Now adding the codes in program.cs:
builder.Services.AddSwaggerGen(c =>{
var xmlFile = ${Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
c.IncludeXmlComments(xmlPath, includeControllerXmlComments: true);
c.EnableAnnotations();});
Last, adding the description which you want to use in front of the controller via the codes:
[SwaggerTag("This is a test")]
You can get more infromation from here.