浏览代码

Fix openapi nullable properties

crobibero 4 年之前
父节点
当前提交
ef97ead707
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

+ 3 - 0
Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

@@ -308,6 +308,9 @@ namespace Jellyfin.Server.Extensions
                                ?? null;
                     });
 
+                // Allow parameters to properly be nullable.
+                c.UseAllOfToExtendReferenceSchemas();
+
                 // TODO - remove when all types are supported in System.Text.Json
                 c.AddSwaggerTypeMappings();