Redoc - Enum doesn't show description when it is List<Enum>
lyk2016 opened this issue · 0 comments
lyk2016 commented
Hi,
Enum in List fail to show description in http://localhost/redoc while work fine in http://localhost/swagger. could you check please? Did I miss anything?
btw. Enum works fine in both Swagger and Redoc when it is not in List.
I appreciate your help!
Environment:
ASP.NET.CORE
NSwag.AspNetCore 14.1.0
.NET 8.0
C#
Code
services.AddOpenApiDocument(configure =>
{
configure.SchemaSettings.GenerateEnumMappingDescription = true;
});
app.UseOpenApi();
app.UseSwaggerUi(config =>
{
config.TagsSorter = "alpha";
});
app.UseReDoc(options =>
{
options.Path = "/redoc";
});
...
/// <summary>
/// test color enum
/// </summary>
/// <param name="filter"></param>
[HttpPost]
[Route("color")]
public void TestColor(ColorFilter filter)
{
}
public enum ColorEnum
{
Red,
Green,
}
public class ColorFilter
{
public ColorEnum? Color { get; set; }
public List<ColorEnum> Colors { get; set; }
}