Просмотр исходного кода

Fix openapi nullable properties

crobibero 4 лет назад
Родитель
Сommit
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();