mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Fix spec generation for TranscodeReason
This commit is contained in:
parent
7fb21132dd
commit
72cfa6d7c9
1 changed files with 12 additions and 0 deletions
|
@ -29,6 +29,7 @@ using Jellyfin.Server.Filters;
|
|||
using Jellyfin.Server.Formatters;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Session;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
|
@ -428,6 +429,17 @@ namespace Jellyfin.Server.Extensions
|
|||
Nullable = true
|
||||
}
|
||||
});
|
||||
|
||||
// Manually describe Flags enum.
|
||||
options.MapType<TranscodeReason>(() =>
|
||||
new OpenApiSchema
|
||||
{
|
||||
Type = "string",
|
||||
Enum = Enum.GetNames<TranscodeReason>()
|
||||
.Select(e => new OpenApiString(e))
|
||||
.Cast<IOpenApiAny>()
|
||||
.ToArray()
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue