diff --git a/src/FilterLists.Api/Startup.cs b/src/FilterLists.Api/Startup.cs index 68cc5e906..2658f7e83 100644 --- a/src/FilterLists.Api/Startup.cs +++ b/src/FilterLists.Api/Startup.cs @@ -61,6 +61,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) app.UseSwagger(c => { c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Host = httpReq.Host.Value); + //TODO: remove preprocessor directives #if RELEASE c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/api"); #endif @@ -76,7 +77,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) MigrateAndSeedDatabase(app); } - //https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/74#issuecomment-386762178 + //TODO: remove hack (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/74#issuecomment-386762178) private static void UseLowercaseControllerNameInSwaggerHack(SwaggerOptions c) { c.PreSerializeFilters.Add((document, request) => diff --git a/src/FilterLists.Api/V1/Controllers/BaseController.cs b/src/FilterLists.Api/V1/Controllers/BaseController.cs index 6de00238d..de44247ed 100644 --- a/src/FilterLists.Api/V1/Controllers/BaseController.cs +++ b/src/FilterLists.Api/V1/Controllers/BaseController.cs @@ -4,7 +4,7 @@ namespace FilterLists.Api.V1.Controllers { [ApiVersion("1.0")] - //https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/370 + //TODO: use versioning without needing to manually specify in swagger-ui (https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/370) [Route("v{version:apiVersion}/[controller]")] public class BaseController : Controller {