aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2021-11-13 07:29:58 -0700
committerCody Robibero <cody@robibe.ro>2021-11-13 07:29:58 -0700
commitbb377b146677d6a752b8b958891c21d0884c4ed7 (patch)
treeff7744e76eba47b4572b390912e8a74b760abff1
parent8868b34d78bdb34f4c47aa4b8e81a1a3cd699ded (diff)
Add nullable dictionary openapi mapping
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs12
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
+ }
+ });
}
}
}