🐛 Fix something

This commit is contained in:
2025-09-26 00:03:09 +08:00
parent d69c9f9623
commit 7b924fa075

View File

@@ -67,13 +67,7 @@ public static class SwaggerGen
{
var publicBasePath = configuration["Swagger:PublicBasePath"]?.TrimEnd('/') ?? "";
// 1. Adjust servers
swaggerDoc.Servers = new List<OpenApiServer>
{
new() { Url = publicBasePath }
};
// 2. Rewrite all path keys (remove /api or replace it)
// Rewrite all path keys (remove /api or replace it)
var newPaths = new OpenApiPaths();
foreach (var (path, pathItem) in swaggerDoc.Paths)
{