mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-05 05:13:02 +02:00
Set openapi version to server version
This commit is contained in:
parent
80846a1c66
commit
500832bdfd
|
@ -260,15 +260,16 @@ namespace Jellyfin.Server.Extensions
|
|||
{
|
||||
return serviceCollection.AddSwaggerGen(c =>
|
||||
{
|
||||
var version = typeof(ApplicationHost).Assembly.GetName().Version?.ToString();
|
||||
c.SwaggerDoc("api-docs", new OpenApiInfo
|
||||
{
|
||||
Title = "Jellyfin API",
|
||||
Version = "v1",
|
||||
Version = version,
|
||||
Extensions = new Dictionary<string, IOpenApiExtension>
|
||||
{
|
||||
{
|
||||
"x-jellyfin-version",
|
||||
new OpenApiString(typeof(ApplicationHost).Assembly.GetName().Version?.ToString())
|
||||
new OpenApiString(version)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue