2
0
Эх сурвалжийг харах

Merge pull request #6838 from crobibero/openapi-nullable

Add nullable dictionary openapi mapping
Claus Vium 3 жил өмнө
parent
commit
2f92ee374a

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

@@ -416,6 +416,18 @@ namespace Jellyfin.Server.Extensions
                             }
                         })
                 });
+
+            // Support dictionary with nullable string value.
+            options.MapType<Dictionary<string, string?>>(() =>
+                new OpenApiSchema
+                {
+                    Type = "object",
+                    AdditionalProperties = new OpenApiSchema
+                    {
+                        Type = "string",
+                        Nullable = true
+                    }
+                });
         }
     }
 }