I'm trying to add more information about one of my API routes using Swashbuckle. I only need to enable XML comments files in Swagger for one of my API routes. But, checking 'XML documentation file:' in Project -> Properties would force me to put XML comments throughout the whole project. Is there a way to achieve this?

For this I've included XML comments, made sure build's Output has the 'XML documentation file:' checked, and have

var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
c.IncludeXmlComments(xmlPath);

in my SwaggerConfig.cs.

Related posts

Recent Viewed