Prechádzať zdrojové kódy

Fix openapi nullable properties

crobibero 4 rokov pred
rodič
commit
ef97ead707

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

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