Skip to content

Commit

Permalink
$type attributes are now given to the client
Browse files Browse the repository at this point in the history
  • Loading branch information
philgei committed Oct 11, 2023
1 parent b7a7f1e commit 1d49136
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions AdLerBackend.API/ConfigureServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using AdLerBackend.API.Middleware;
using AdLerBackend.Application.Configuration;
using Microsoft.AspNetCore.Http.Features;
using Newtonsoft.Json.Converters;

namespace AdLerBackend.API;

Expand All @@ -22,10 +21,12 @@ public static class ConfigureServices
public static IServiceCollection AddApiServices(this IServiceCollection services)
{
services
.AddControllers(options => options.Filters.Add<ApiExceptionFilterAttribute>())
.AddNewtonsoftJson(opts =>
opts.SerializerSettings.Converters.Add(new StringEnumConverter()));

.AddControllers(options => options.Filters.Add<ApiExceptionFilterAttribute>());
// .AddNewtonsoftJson(opts =>
// {
// opts.SerializerSettings.Converters.Add(new StringEnumConverter());
// //opts.SerializerSettings.TypeNameHandling = TypeNameHandling.Objects;
// });

services.AddEndpointsApiExplorer();
services.AddHealthChecks();
Expand Down

0 comments on commit 1d49136

Please sign in to comment.