aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-06-19 15:49:44 +0200
committerDavid <daullmer@gmail.com>2020-06-19 15:49:44 +0200
commit08401f923dbe1bdf0086f905a6a9575b5ac9c5cd (patch)
tree66fd2f8f15e5d6ebc6749a2ad8cd2908ee261491
parent6651cb8d24f0de690b3be68db7c0b78e2413534f (diff)
Change swagger dictionary type mapping
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
index 821a52e47..aad61d042 100644
--- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
+++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
@@ -216,6 +216,9 @@ namespace Jellyfin.Server.Extensions
})
});
+ /*
+ * Support BlurHash dictionary
+ */
options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() =>
new OpenApiSchema
{
@@ -224,8 +227,17 @@ namespace Jellyfin.Server.Extensions
name => name,
name => new OpenApiSchema
{
- Type = "string",
- Format = "string"
+ Type = "object", Properties = new Dictionary<string, OpenApiSchema>
+ {
+ {
+ "string",
+ new OpenApiSchema
+ {
+ Type = "string",
+ Format = "string"
+ }
+ }
+ }
})
});
}