mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
4add4939dc
commit
76b084499a
2 changed files with 3 additions and 2 deletions
|
|
@ -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) =>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue