diff options
| author | crobibero <cody@robibe.ro> | 2020-06-21 11:34:05 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-06-21 11:34:05 -0600 |
| commit | 38788a1f1d3b605b2d4443c3467e345597a87697 (patch) | |
| tree | bb42252d7d7c5c16f4fc431698e7504b75d76291 /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | |
| parent | 45234e5ecd787c4d2e9aadae8459917f3baee045 (diff) | |
| parent | 3bf19d1e938a13dd2a507a320b08a12793ff3443 (diff) | |
Merge remote-tracking branch 'upstream/api-migration' into api-library
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 5f2fb7ea6..e4ecd343c 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -224,6 +224,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" + } + } + } + }) + }); } } } |
