From 49c825d193b50ef1444ce3e19d44191769321a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Tom=C3=A1s?= Date: Wed, 13 Sep 2017 16:19:27 +0200 Subject: [PATCH] Added BasePath to swagger endpoint Override environment variables urls --- .../ApplicationManifest.xml | 18 ++++++++++++++---- .../CatalogApiPkg/ServiceManifest.xml | 2 +- .../LocationsApiPkg/ServiceManifest.xml | 2 +- .../MarketingApiPkg/ServiceManifest.xml | 2 +- .../OrderingApiPkg/ServiceManifest.xml | 2 +- .../ApplicationParameters/Cloud.xml | 1 + .../ApplicationManifest.xml | 18 +++++++++++++++++- .../IdentityApiPkg/ServiceManifest.xml | 10 +++++----- .../ApplicationParameters/Cloud.xml | 9 ++++++++- .../ApplicationManifest.xml | 6 +++++- .../WebMVCPkg/ServiceManifest.xml | 2 +- .../ApplicationParameters/Cloud.xml | 1 + .../ApplicationManifest.xml | 14 +++++++++++++- .../ApplicationParameters/Cloud.xml | 7 ++++++- src/Services/Basket/Basket.API/Startup.cs | 2 +- src/Services/Location/Locations.API/Startup.cs | 2 +- .../Marketing/Marketing.API/Startup.cs | 2 +- src/Services/Payment/Payment.API/Startup.cs | 2 +- 18 files changed, 79 insertions(+), 23 deletions(-) diff --git a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml index 79ef2a10e..6c745499d 100644 --- a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml +++ b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml @@ -18,6 +18,7 @@ + + + + @@ -51,7 +55,9 @@ - + + + @@ -87,7 +93,9 @@ - + + + @@ -105,7 +113,9 @@ - + + + diff --git a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml index 88a44bf5c..e978f2ecc 100644 --- a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml +++ b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -23,7 +23,7 @@ - + diff --git a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml index 5c01dd68b..749d7a051 100644 --- a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml +++ b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -25,7 +25,7 @@ - + diff --git a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml index 8b022545c..2e40a14a3 100644 --- a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -23,7 +23,7 @@ - + diff --git a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml index 1ddc3ce4d..e858bb8c8 100644 --- a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml +++ b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -24,7 +24,7 @@ - + diff --git a/ServiceFabric/eShopOnServiceFabric/ApplicationParameters/Cloud.xml b/ServiceFabric/eShopOnServiceFabric/ApplicationParameters/Cloud.xml index 712f180a1..d250e1eea 100644 --- a/ServiceFabric/eShopOnServiceFabric/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/eShopOnServiceFabric/ApplicationParameters/Cloud.xml @@ -12,5 +12,6 @@ + \ No newline at end of file diff --git a/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml index 4dc9c515a..21990aa56 100644 --- a/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml +++ b/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml @@ -6,13 +6,29 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + + + + + + - + + + + + + + + + + diff --git a/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml b/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml index 7ce014a27..02ec66197 100644 --- a/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml +++ b/ServiceFabric/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml @@ -19,21 +19,21 @@ - + - - + + - + - + - + + + + diff --git a/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml index 210bebe9e..82f2efa0d 100644 --- a/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml +++ b/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -25,7 +25,7 @@ - + diff --git a/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml b/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml index 81f48e8f9..4cfdd41d3 100644 --- a/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml index cf23a0779..1631563e9 100644 --- a/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml +++ b/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml @@ -6,13 +6,25 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + + + + - + + + + + + + + diff --git a/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml b/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml index 44b9681b6..961839849 100644 --- a/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml +++ b/ServiceFabric/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml @@ -2,5 +2,10 @@ + + + + + - \ No newline at end of file + diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index df079e4e6..b82a912d8 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -185,7 +185,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); c.ConfigureOAuth2("basketswaggerui", "", "", "Basket Swagger UI"); }); diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs index b2147cbd1..fdc55de87 100644 --- a/src/Services/Location/Locations.API/Startup.cs +++ b/src/Services/Location/Locations.API/Startup.cs @@ -156,7 +156,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); c.ConfigureOAuth2("locationsswaggerui", "", "", "Locations Swagger UI"); }); diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index bac62095f..a509c0c81 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -188,7 +188,7 @@ app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); c.ConfigureOAuth2("marketingswaggerui", "", "", "Marketing Swagger UI"); }); diff --git a/src/Services/Payment/Payment.API/Startup.cs b/src/Services/Payment/Payment.API/Startup.cs index e4378dcef..fba05cb86 100644 --- a/src/Services/Payment/Payment.API/Startup.cs +++ b/src/Services/Payment/Payment.API/Startup.cs @@ -103,7 +103,7 @@ namespace Payment.API app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); }); ConfigureEventBus(app);