pwcs
pwcs
  增加一个过滤器就有了,我的是net6 ,希望对大家有帮助 public class SwaggerSchemaFilter : ISchemaFilter { public void Apply(OpenApiSchema schema, SchemaFilterContext context) { if (context.Type.IsEnum) { StringBuilder stringBuilder = new StringBuilder(); Enum.GetNames(context.Type) .ToList() .ForEach(name => {...