diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2021-11-13 19:32:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-13 19:32:11 +0100 |
| commit | 2f92ee374a02bc434a8b158c67f02754fbf9df6e (patch) | |
| tree | ff7744e76eba47b4572b390912e8a74b760abff1 | |
| parent | 8868b34d78bdb34f4c47aa4b8e81a1a3cd699ded (diff) | |
| parent | bb377b146677d6a752b8b958891c21d0884c4ed7 (diff) | |
Merge pull request #6838 from crobibero/openapi-nullable
Add nullable dictionary openapi mapping
| -rw-r--r-- | Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs index e853609d6..fa98fda69 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -416,6 +416,18 @@ namespace Jellyfin.Server.Extensions } }) }); + + // Support dictionary with nullable string value. + options.MapType<Dictionary<string, string?>>(() => + new OpenApiSchema + { + Type = "object", + AdditionalProperties = new OpenApiSchema + { + Type = "string", + Nullable = true + } + }); } } } |
