try removing custom swagger prefix

ref #131
This commit is contained in:
Collin M. Barrett 2018-06-06 21:31:01 -05:00
parent df6f248884
commit f24ab00c4c
4 changed files with 4 additions and 8 deletions

2
.github/README.md vendored
View file

@ -9,7 +9,7 @@ FilterLists is the independent, comprehensive directory of filter and host lists
## Links
| Site | API |
| --------------------------------------------------- | ------------------------------------------------------ |
| [v3 (Live, Beta)](https://filterlists.com/) | [v1 (Live, Beta)](https://filterlists.com/api/docs) |
| [v3 (Live, Beta)](https://filterlists.com/) | [v1 (Live, Beta)](https://filterlists.com/api/swagger/)|
| [v2 (Legacy, Frozen)](https://v2.filterlists.com/) | |
| [v1 (Legacy, Frozen)](https://v1.filterlists.com/) | |

View file

@ -61,11 +61,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseSwagger(UseLowercaseControllerNameInSwaggerHack);
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint(
env.IsDevelopment()
? "/../swagger/v1/swagger.json"
: "https://filterlists.com/api/swagger/v1/swagger.json", "FilterLists API V1");
c.RoutePrefix = "docs";
c.SwaggerEndpoint("/swagger/v1/swagger.json", "FilterLists API V1");
c.DocumentTitle = "FilterLists API";
});
MigrateAndSeedDatabase(app);

View file

@ -5,7 +5,7 @@ namespace FilterLists.Api.V1.Controllers
{
[ApiVersion("1.0")]
//https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/370
[Route("api/v{version:apiVersion}/[controller]")]
[Route("v{version:apiVersion}/[controller]")]
public class BaseController : Controller
{
protected readonly SeedService SeedService;

View file

@ -21,7 +21,7 @@ export class Layout extends React.Component<ILayoutProps, {}> {
</div>
<div className="row justify-content-center">
<p className="mt-2 ml-1 mr-1">
<a href="https://filterlists.com/api/docs/">API</a> | <a href="https://github.com/collinbarrett/FilterLists">GitHub</a> | By <a href="https://collinmbarrett.com/">Collin M. Barrett</a>
<a href="https://filterlists.com/api/swagger/">API</a> | <a href="https://github.com/collinbarrett/FilterLists">GitHub</a> | By <a href="https://collinmbarrett.com/">Collin M. Barrett</a>
</p>
</div>
</div>;