|
|
@@ -9,7 +9,10 @@ public class AppServer
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
ConfigureServices(builder.Services, builder.Configuration);
|
|
|
- builder.Services.AddControllers();
|
|
|
+ builder.Services.AddControllers().AddJsonOptions(options =>
|
|
|
+ {
|
|
|
+ options.JsonSerializerOptions.Converters.Add(new ObjectIdConverter());
|
|
|
+ });
|
|
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
|
|
builder.Services.AddEndpointsApiExplorer();
|
|
|
builder.Services.AddSwaggerGen();
|