mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
9622ba2276
commit
0ddb7e0537
2 changed files with 6 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Microsoft.ApplicationInsights.Extensibility.Implementation;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.PlatformAbstractions;
|
||||
|
|
@ -26,7 +27,9 @@ private static void AddSwaggerGenCustom(this IServiceCollection services)
|
|||
Title = "FilterLists API",
|
||||
Version = "v1",
|
||||
Description =
|
||||
"A REST-ish API for FilterLists, the independent, comprehensive directory of all public filter and hosts lists for advertisements, trackers, malware, and annoyances.",
|
||||
"A REST-ish API for FilterLists, the independent, comprehensive directory of all public filter and hosts lists for advertisements, trackers, malware, and annoyances." +
|
||||
Environment.NewLine +
|
||||
" - {version} has to be specified manually in Swagger playground below due to https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/370",
|
||||
Contact = new Contact
|
||||
{
|
||||
Url = "https://github.com/collinbarrett/FilterLists/",
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
|||
app.UseMvc();
|
||||
app.UseSwagger(c =>
|
||||
{
|
||||
c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/api");
|
||||
c.RouteTemplate = "docs/{documentName}/swagger.json";
|
||||
UseLowercaseControllerNameInSwaggerHack(c);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue