Skip to content

Commit c211f96

Browse files
author
igorsych
committed
swagger/ui to swagger url fix
1 parent ec07a68 commit c211f96

11 files changed

Lines changed: 14 additions & 34 deletions

File tree

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
using Microsoft.AspNetCore.Mvc;
6-
7-
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
1+
using Microsoft.AspNetCore.Mvc;
82

93
namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers
104
{
@@ -13,7 +7,7 @@ public class HomeController : Controller
137
// GET: /<controller>/
148
public IActionResult Index()
159
{
16-
return new RedirectResult("~/swagger/ui");
10+
return new RedirectResult("~/swagger");
1711
}
1812
}
1913
}

src/Services/Basket/Basket.API/Model/Basket.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
1+
using System.Collections.Generic;
52

63
namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
74
{

src/Services/Basket/Basket.API/Model/BasketItem.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
6-
namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
1+
namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
72
{
83
public class BasketItem
94
{

src/Services/Basket/Basket.API/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"IIS Express": {
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
14-
"launchUrl": "api/values",
14+
"launchUrl": "swagger",
1515
"environmentVariables": {
1616
"ASPNETCORE_ENVIRONMENT": "Development"
1717
}
1818
},
1919
"Microsoft.eShopOnContainers.Services.Basket.API": {
2020
"commandName": "Project",
2121
"launchBrowser": true,
22-
"launchUrl": "http://localhost:5000/api/values",
22+
"launchUrl": "http://localhost:5000/swagger",
2323
"environmentVariables": {
2424
"ASPNETCORE_ENVIRONMENT": "Development"
2525
}

src/Services/Basket/Basket.API/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void ConfigureServices(IServiceCollection services)
8585
services.AddSwaggerGen(options =>
8686
{
8787
options.DescribeAllEnumsAsStrings();
88-
options.SwaggerDoc("eShopOnContainers - Basket HTTP API", new Swashbuckle.AspNetCore.Swagger.Info
88+
options.SwaggerDoc("v1", new Swashbuckle.AspNetCore.Swagger.Info
8989
{
9090
Title = "Basket HTTP API",
9191
Version = "v1",

src/Services/Catalog/Catalog.API/Controllers/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class HomeController : Controller
99
// GET: /<controller>/
1010
public IActionResult Index()
1111
{
12-
return new RedirectResult("~/swagger/ui");
12+
return new RedirectResult("~/swagger");
1313
}
1414
}
1515
}

src/Services/Catalog/Catalog.API/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"IIS Express": {
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
14-
"launchUrl": "/swagger/ui",
14+
"launchUrl": "/swagger",
1515
"environmentVariables": {
1616
"ASPNETCORE_ENVIRONMENT": "Development"
1717
}

src/Services/Catalog/Catalog.API/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void ConfigureServices(IServiceCollection services)
8585
services.AddSwaggerGen(options =>
8686
{
8787
options.DescribeAllEnumsAsStrings();
88-
options.SwaggerDoc("eShopOnContainers - Catalog HTTP API",new Swashbuckle.AspNetCore.Swagger.Info
88+
options.SwaggerDoc("v1",new Swashbuckle.AspNetCore.Swagger.Info
8989
{
9090
Title = "eShopOnContainers - Catalog HTTP API",
9191
Version = "v1",
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
using Microsoft.AspNetCore.Mvc;
6-
7-
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
1+
using Microsoft.AspNetCore.Mvc;
82

93
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Controllers
104
{
@@ -13,7 +7,7 @@ public class HomeController : Controller
137
// GET: /<controller>/
148
public IActionResult Index()
159
{
16-
return new RedirectResult("~/swagger/ui");
10+
return new RedirectResult("~/swagger");
1711
}
1812
}
1913
}

src/Services/Ordering/Ordering.API/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"IIS Express": {
1212
"commandName": "IISExpress",
1313
"launchBrowser": true,
14-
"launchUrl": "/swagger/ui",
14+
"launchUrl": "/swagger",
1515
"environmentVariables": {
1616
"ASPNETCORE_ENVIRONMENT": "Development"
1717
}

0 commit comments

Comments
 (0)