diff --git a/Feature.Manager.Api/Startup.cs b/Feature.Manager.Api/Startup.cs index 85a8b06..44e7dac 100644 --- a/Feature.Manager.Api/Startup.cs +++ b/Feature.Manager.Api/Startup.cs @@ -1,3 +1,4 @@ +using System.Text.Json.Serialization; using Feature.Manager.Api.StartupExtensions; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; @@ -23,7 +24,10 @@ public void ConfigureServices(IServiceCollection services) services.AddMetrics(); services.ConfigureRequiredDependencies(); services.ConfigureHealthChecks(); - services.AddControllers(); + services.AddControllers().AddJsonOptions(x => + { + x.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()); + }); services.ConfigureSwagger(); services.RegisterWorker(); }