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