瀏覽代碼

Enable non-nullable reference types in generated api spec

crobibero 4 年之前
父節點
當前提交
9da972682c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

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

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