소스 검색

Manually describe Version for openapi

Cody Robibero 3 년 전
부모
커밋
760b021032
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  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"
+            });
         }
     }
 }