I tried using the following line
builder.Services.Configure<JsonSerializerOptions>(options => options.Converters.Add(new JsonStringEnumConverter()));
to configure that the enums are converted to string when returning
return Results.Ok(new SummarizationResult(SummarizationStatus.InProcess));
being the enum
public enum SummarizationStatus
{
Ok,
Failed,
InProcess
}
But that keeps returning the enum as a number 2
{
"status": 2,
"message": null,
"summary": null
}