Change swagger dictionary type mapping

pull/3363/head
David 5 years ago
parent 6651cb8d24
commit 08401f923d

@ -216,6 +216,9 @@ namespace Jellyfin.Server.Extensions
}) })
}); });
/*
* Support BlurHash dictionary
*/
options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() => options.MapType<Dictionary<ImageType, Dictionary<string, string>>>(() =>
new OpenApiSchema new OpenApiSchema
{ {
@ -223,9 +226,18 @@ namespace Jellyfin.Server.Extensions
Properties = typeof(ImageType).GetEnumNames().ToDictionary( Properties = typeof(ImageType).GetEnumNames().ToDictionary(
name => name, name => name,
name => new OpenApiSchema name => new OpenApiSchema
{
Type = "object", Properties = new Dictionary<string, OpenApiSchema>
{
{
"string",
new OpenApiSchema
{ {
Type = "string", Type = "string",
Format = "string" Format = "string"
}
}
}
}) })
}); });
} }

Loading…
Cancel
Save