Swashbuckle.aspnetcore: Add support to set BaseURL

Created on 5 Jul 2017  路  4Comments  路  Source: domaindrivendev/Swashbuckle.AspNetCore

Plase add support in EnableSwagger() to can be able to set BaseUrl in order to change URL use by Try It Out Button.

Most helpful comment

I was able to make this work by seeting the basePath like this:
.UseSwagger(c =>
{
c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/MyServiceApp/MyService");
})

All 4 comments

+1

I was able to make this work by seeting the basePath like this:
.UseSwagger(c =>
{
c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/MyServiceApp/MyService");
})

I was able to make this work by seeting the basePath like this:
.UseSwagger(c =>
{
c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/MyServiceApp/MyService");
})

swaggerDoc.BasePath is not working with swashbuckle.aspnetcore version 5.3.3. How to fix this now?

Was this page helpful?
0 / 5 - 0 ratings