This is commonly caused by a missing configuration, make sure you have the IncludeXmlComments with the correct path to your XML document.
Here is a way to include all XML documents on the configuration:
public void ConfigureServices(IServiceCollection services)
{
// Add Swashbuckle
services.AddSwaggerGen(options =>
{
options.DescribeAllEnumsAsStrings();
options.SingleApiVersion(new Swashbuckle.Swagger.Model.Info()
{
Title = "My API",
Version = "v1",
Description = "My API",
TermsOfService = "Terms Of Service"
});
//Set the comments path for the swagger json and ui.
var basePath = PlatformServices.Default.Application.ApplicationBasePath;
foreach (var name in Directory.GetFiles(basePath, "*.XML", SearchOption.AllDirectories))
{
options.IncludeXmlComments(name);
}
});
// Add framework services.
services.AddMvc();
}
Here is an example showing correctly:
http://swashbuckletest.azurewebsites.net/swagger/ui/index?filter=TestEnum#/TestEnum/TestEnum_Put
And the code behind that is on GitHub:
https://github.com/heldersepu/SwashbuckleTest/blob/master/Swagger_Test/Models/ViewModelTest.cs