diff options
| author | David <daullmer@gmail.com> | 2020-06-19 12:24:39 +0200 |
|---|---|---|
| committer | David <daullmer@gmail.com> | 2020-06-19 12:24:39 +0200 |
| commit | 6651cb8d24f0de690b3be68db7c0b78e2413534f (patch) | |
| tree | c089ccf0359c4e8f5e8fd11bfbcfbb497a3c2f8d /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | |
| parent | 77bea567082528be3d1da09ed214ec0a1e192a97 (diff) | |
Add JsonInto32Converter
Add additional swagger type mapping
Diffstat (limited to 'Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs')
| -rw-r--r-- | Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs index dbd5ba416..821a52e47 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -215,6 +215,19 @@ namespace Jellyfin.Server.Extensions Format = "string" }) }); + + options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() => + new OpenApiSchema + { + Type = "object", + Properties = typeof(ImageType).GetEnumNames().ToDictionary( + name => name, + name => new OpenApiSchema + { + Type = "string", + Format = "string" + }) + }); } } } |
