mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
parent
0ddb7e0537
commit
38b907c827
2 changed files with 6 additions and 3 deletions
|
|
@ -60,13 +60,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
|||
app.UseMvc();
|
||||
app.UseSwagger(c =>
|
||||
{
|
||||
c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Host = httpReq.Host.Value);
|
||||
#if RELEASE
|
||||
c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/api");
|
||||
c.RouteTemplate = "docs/{documentName}/swagger.json";
|
||||
#endif
|
||||
c.RouteTemplate = "/docs/{documentName}/swagger.json";
|
||||
UseLowercaseControllerNameInSwaggerHack(c);
|
||||
});
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("v1/swagger.json", "FilterLists API v1");
|
||||
c.SwaggerEndpoint("/docs/v1/swagger.json", "FilterLists API v1");
|
||||
c.DocumentTitle = "FilterLists API v1";
|
||||
c.RoutePrefix = "docs";
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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/docs/index.html">API</a> | <a href="https://github.com/collinbarrett/FilterLists">GitHub</a> | By <a href="https://collinmbarrett.com/">Collin M. Barrett</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue