1 files changed, 10 insertions, 2 deletions
diff --git a/Tests/LibMatrix.HomeserverEmulator/Program.cs b/Tests/LibMatrix.HomeserverEmulator/Program.cs
index 91e0f88..9ea6fce 100644
--- a/Tests/LibMatrix.HomeserverEmulator/Program.cs
+++ b/Tests/LibMatrix.HomeserverEmulator/Program.cs
@@ -1,6 +1,7 @@
using System.Net.Mime;
using System.Text.Json.Serialization;
using LibMatrix;
+using LibMatrix.HomeserverEmulator.Extensions;
using LibMatrix.HomeserverEmulator.Services;
using LibMatrix.Services;
using Microsoft.AspNetCore.Diagnostics;
@@ -10,8 +11,15 @@ using Microsoft.OpenApi.Models;
var builder = WebApplication.CreateBuilder(args);
-// Add services to the container.
-builder.Services.AddControllers().AddJsonOptions(options => { options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull; });
+builder.Services.Configure<ApiBehaviorOptions>(options =>
+{
+ options.SuppressModelStateInvalidFilter = true;
+});
+
+builder.Services.AddControllers(options => {
+ options.MaxValidationDepth = null;
+ options.MaxIAsyncEnumerableBufferLimit = 100;
+}).AddJsonOptions(options => { options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull; });
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(c => {
|