Explorar el Código

Merge pull request #7775 from crobibero/openapi-version

(cherry picked from commit 4c0510ee6dbc43609eb3709eaa82e8f469d5a7b4)
Signed-off-by: crobibero <cody@robibe.ro>
Cody Robibero hace 3 años
padre
commit
d078daad39
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

+ 6 - 0
Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs

@@ -440,6 +440,12 @@ namespace Jellyfin.Server.Extensions
                         .Cast<IOpenApiAny>()
                         .ToArray()
                 });
+
+            // Swashbuckle doesn't use JsonOptions to describe responses, so we need to manually describe it.
+            options.MapType<Version>(() => new OpenApiSchema
+            {
+                Type = "string"
+            });
         }
     }
 }