diff --git a/TramsDataApi/Startup.cs b/TramsDataApi/Startup.cs index 6d6de9b1c..f555d700a 100644 --- a/TramsDataApi/Startup.cs +++ b/TramsDataApi/Startup.cs @@ -1,3 +1,4 @@ +using System.Text.Json.Serialization; using Dfe.Academisation.CorrelationIdMiddleware; namespace TramsDataApi @@ -36,7 +37,7 @@ public Startup(IConfiguration configuration) // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - services.AddControllers(); + services.AddControllers().AddJsonOptions(c => {c.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());}); services.AddApiVersioning(); services.AddFeatureManagement();