Merge pull request #5512 from crobibero/api-spec-version

This commit is contained in:
Claus Vium 2021-03-15 18:01:20 +01:00 committed by GitHub
commit 94820f569b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,15 +260,16 @@ namespace Jellyfin.Server.Extensions
{
return serviceCollection.AddSwaggerGen(c =>
{
var version = typeof(ApplicationHost).Assembly.GetName().Version?.ToString() ?? "0.0.0.1";
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)
}
}
});