mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
Merge pull request #4625 from crobibero/api-docs-description
Fix OpenApi generation for BlurHash
This commit is contained in:
commit
28373504da
1 changed files with 9 additions and 18 deletions
|
@ -285,20 +285,17 @@ namespace Jellyfin.Server.Extensions
|
||||||
private static void AddSwaggerTypeMappings(this SwaggerGenOptions options)
|
private static void AddSwaggerTypeMappings(this SwaggerGenOptions options)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* TODO remove when System.Text.Json supports non-string keys.
|
* TODO remove when System.Text.Json properly supports non-string keys.
|
||||||
* Used in Jellyfin.Api.Controller.GetChannels.
|
* Used in BaseItemDto.ImageBlurHashes
|
||||||
*/
|
*/
|
||||||
options.MapType<Dictionary<ImageType, string>>(() =>
|
options.MapType<Dictionary<ImageType, string>>(() =>
|
||||||
new OpenApiSchema
|
new OpenApiSchema
|
||||||
{
|
{
|
||||||
Type = "object",
|
Type = "object",
|
||||||
Properties = typeof(ImageType).GetEnumNames().ToDictionary(
|
AdditionalProperties = new OpenApiSchema
|
||||||
name => name,
|
{
|
||||||
name => new OpenApiSchema
|
Type = "string"
|
||||||
{
|
}
|
||||||
Type = "string",
|
|
||||||
Format = "string"
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -312,16 +309,10 @@ namespace Jellyfin.Server.Extensions
|
||||||
name => name,
|
name => name,
|
||||||
name => new OpenApiSchema
|
name => new OpenApiSchema
|
||||||
{
|
{
|
||||||
Type = "object", Properties = new Dictionary<string, OpenApiSchema>
|
Type = "object",
|
||||||
|
AdditionalProperties = new OpenApiSchema
|
||||||
{
|
{
|
||||||
{
|
Type = "string"
|
||||||
"string",
|
|
||||||
new OpenApiSchema
|
|
||||||
{
|
|
||||||
Type = "string",
|
|
||||||
Format = "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue