From 3c6711c60884cb4506a3cd3de13521ed5cb945ec Mon Sep 17 00:00:00 2001 From: Iskander Yarmukhametov Date: Tue, 12 Feb 2019 14:32:03 +0300 Subject: [PATCH] * Swagger UI endpoint is default route for application now. --- README.md | 4 ++-- source/TestAuthorityCore/Startup.cs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 04c7d8d..417ec0c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/source/TestAuthorityCore/Startup.cs b/source/TestAuthorityCore/Startup.cs index fba63ed..8cf65fe 100644 --- a/source/TestAuthorityCore/Startup.cs +++ b/source/TestAuthorityCore/Startup.cs @@ -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; @@ -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.