diff --git a/src/framework/Framework.Swagger/SwaggerGenConfiguration.cs b/src/framework/Framework.Swagger/SwaggerGenConfiguration.cs index 8bfcf3b5d4..da01b63fa0 100644 --- a/src/framework/Framework.Swagger/SwaggerGenConfiguration.cs +++ b/src/framework/Framework.Swagger/SwaggerGenConfiguration.cs @@ -35,6 +35,7 @@ public static void SetupSwaggerGen(SwaggerGenOptions c, string version c.SwaggerDoc(version, new OpenApiInfo { Title = assemblyName, Version = version }); c.MapType(typeof(IFormFile), () => new OpenApiSchema { Type = "file", Format = "binary" }); + c.SupportNonNullableReferenceTypes(); c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme {