diff options
| author | David Ullmer <daullmer@gmail.com> | 2020-06-20 20:45:16 +0200 |
|---|---|---|
| committer | David Ullmer <daullmer@gmail.com> | 2020-06-20 20:45:16 +0200 |
| commit | d4c86b82e03352f7bab92f5fe05686891af1cd3e (patch) | |
| tree | 01217f621de90c0d95ae5b5dddfec0e32308ba2c /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | |
| parent | a5bd7f2d6ee0fef67c34f61db9be36167c30d890 (diff) | |
| parent | 804764e1fbf71e083479fc4069f90bab96faa84f (diff) | |
Merge remote-tracking branch 'remotes/upstream/api-migration' into api-sessionservice
# Conflicts:
# Jellyfin.Api/Helpers/RequestHelpers.cs
Diffstat (limited to 'Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs')
| -rw-r--r-- | Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs index dbd5ba416..aad61d042 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -215,6 +215,31 @@ namespace Jellyfin.Server.Extensions Format = "string" }) }); + + /* + * Support BlurHash dictionary + */ + options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() => + new OpenApiSchema + { + Type = "object", + Properties = typeof(ImageType).GetEnumNames().ToDictionary( + name => name, + name => new OpenApiSchema + { + Type = "object", Properties = new Dictionary<string, OpenApiSchema> + { + { + "string", + new OpenApiSchema + { + Type = "string", + Format = "string" + } + } + } + }) + }); } } } |
