Forráskód Böngészése

Manually describe Version for openapi

Cody Robibero 3 éve
szülő
commit
760b021032

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

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