An API may have more than one URIs, e.g. https://myapi.com/, or https://allapis.com/my. When accessed via myapi.com, the Swagger page works fine. When accessed via allapis.com/my, the Swagger page allapis.com/my/swagger/index.html should load allapis.com/my/swagger/v1/swagger.json, but it actually tries to load allapis.com/swagger/v1/swagger.json (missing /my).
Relative path can solve this problem. But NSwag uses Microsoft.AspNetCore.Http.PathString which requires an absolute path.
An API may have more than one URIs, e.g. https://myapi.com/, or https://allapis.com/my. When accessed via myapi.com, the Swagger page works fine. When accessed via allapis.com/my, the Swagger page allapis.com/my/swagger/index.html should load allapis.com/my/swagger/v1/swagger.json, but it actually tries to load allapis.com/swagger/v1/swagger.json (missing /my).
Relative path can solve this problem. But NSwag uses
Microsoft.AspNetCore.Http.PathString
which requires an absolute path.