Explorar el Código

Change swagger dictionary type mapping

David hace 5 años
padre
commit
08401f923d
Se han modificado 1 ficheros con 14 adiciones y 2 borrados
  1. 14 2
      Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

+ 14 - 2
Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

@@ -216,6 +216,9 @@ namespace Jellyfin.Server.Extensions
                         })
                         })
                 });
                 });
 
 
+            /*
+             * Support BlurHash dictionary
+             */
             options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() =>
             options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() =>
                 new OpenApiSchema
                 new OpenApiSchema
                 {
                 {
@@ -224,8 +227,17 @@ namespace Jellyfin.Server.Extensions
                         name => name,
                         name => name,
                         name => new OpenApiSchema
                         name => new OpenApiSchema
                         {
                         {
-                            Type = "string",
-                            Format = "string"
+                            Type = "object", Properties = new Dictionary<string, OpenApiSchema>
+                            {
+                                {
+                                    "string",
+                                    new OpenApiSchema
+                                    {
+                                        Type = "string",
+                                        Format = "string"
+                                    }
+                                }
+                            }
                         })
                         })
                 });
                 });
         }
         }