Skip to content

Commit

Permalink
* Swagger UI endpoint is default route for application now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Iskander Yarmukhametov committed Feb 12, 2019
1 parent bc356f9 commit 3c6711c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ https://hub.docker.com/r/nomail/test-authority/

# Swagger enabled (WebUI)

You can use swagger for simple and explicit certificate issue.
You can use swagger UI for simple and explicit certificate issue.

`http://localhost:5000/swagger`
`http://localhost:5000`

# Additional info

Expand Down
7 changes: 6 additions & 1 deletion source/TestAuthorityCore/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -34,7 +35,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
app.UseMvc();

app.UseSwagger();
app.UseSwaggerUI(config => config.SwaggerEndpoint("/swagger/v1/swagger.json", "Personal Signing Center"));
app.UseSwaggerUI(config =>
{
config.SwaggerEndpoint("/swagger/v1/swagger.json", "Personal Signing Center");
config.RoutePrefix = "";
});
}

// This method gets called by the runtime. Use this method to add services to the container.
Expand Down

0 comments on commit 3c6711c

Please sign in to comment.