Swagger BaseURL empty

Viewed 132

I am using the following Nuget in my ASP.NET Web API: https://www.nuget.org/packages/Swashbuckle/ Version: 5.6.0

I see the base URL on the Swagger for my API, shows blank. Is there a way to add base URL or remove that tag entirely?

Click here to see the image of the base URL on the swagger

I installed the Nuget package & updated the generated SwaggerConfig.cs as follows:

GlobalConfiguration.Configuration
    .EnableSwagger(c =>
        {
            c.SingleApiVersion("v1", "API title").Contact(cc => cc.Name("team name").Email("email address"));
            c.IncludeXmlComments(string.Format(@"{0}\bin\xmlName.XML", System.AppDomain.CurrentDomain.BaseDirectory));
        })
    .EnableSwaggerUi(c =>
        {
            c.DocumentTitle("document title");
            c.DisableValidator();
            c.DocExpansion(DocExpansion.List);
        });
0 Answers
Related