From d078daad39b6c33294a7b7e8407ca63a74872431 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sat, 21 May 2022 08:59:24 -0600 Subject: [PATCH] Merge pull request #7775 from crobibero/openapi-version (cherry picked from commit 4c0510ee6dbc43609eb3709eaa82e8f469d5a7b4) Signed-off-by: crobibero --- .../Extensions/ApiServiceCollectionExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs index 3df8481fd4..66fa3bc31b 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -440,6 +440,12 @@ namespace Jellyfin.Server.Extensions .Cast() .ToArray() }); + + // Swashbuckle doesn't use JsonOptions to describe responses, so we need to manually describe it. + options.MapType(() => new OpenApiSchema + { + Type = "string" + }); } } }