diff options
| author | crobibero <cody@robibe.ro> | 2020-06-20 16:26:42 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-06-20 16:26:42 -0600 |
| commit | b603742a77bc67a1b689ab88b278be2b9c07480e (patch) | |
| tree | 295999fb1e616fa489805fa3b1da08c792c13d71 /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | |
| parent | cd273c4e98246420edf39ef63c906fbc3725d8e4 (diff) | |
| parent | deac459b62de53ed3db0e24fe1ebde95bf10dccd (diff) | |
Merge remote-tracking branch 'upstream/api-migration' into api-image-service
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" + } + } + } + }) + }); } } } |
