From 59d5c4fc34bca9a6541bc32371dcaa027490e1c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20P=C3=A9rez=20Ngounou?= Date: Sat, 11 Feb 2023 18:19:27 +0100 Subject: [PATCH] jhkjl --- .../Bowling Api Gateway.csproj | 5 +++++ Sources/Bowling Api Gateway/Program.cs | 2 +- .../Properties/launchSettings.json | 3 +-- Sources/BowlingApi/Program.cs | 15 +++++---------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Sources/Bowling Api Gateway/Bowling Api Gateway.csproj b/Sources/Bowling Api Gateway/Bowling Api Gateway.csproj index eba223c..407a7fb 100644 --- a/Sources/Bowling Api Gateway/Bowling Api Gateway.csproj +++ b/Sources/Bowling Api Gateway/Bowling Api Gateway.csproj @@ -6,8 +6,13 @@ enable Bowling_Api_Gateway Linux + WinExe + + 4 + + diff --git a/Sources/Bowling Api Gateway/Program.cs b/Sources/Bowling Api Gateway/Program.cs index fd62947..351fb68 100644 --- a/Sources/Bowling Api Gateway/Program.cs +++ b/Sources/Bowling Api Gateway/Program.cs @@ -19,6 +19,6 @@ app.UseOcelot(); -//app.MapGet("/", () => "Hello World!"); +app.MapGet("/", () => "Hello World!"); app.Run(); \ No newline at end of file diff --git a/Sources/Bowling Api Gateway/Properties/launchSettings.json b/Sources/Bowling Api Gateway/Properties/launchSettings.json index 4f2177e..2e67029 100644 --- a/Sources/Bowling Api Gateway/Properties/launchSettings.json +++ b/Sources/Bowling Api Gateway/Properties/launchSettings.json @@ -11,7 +11,6 @@ "profiles": { "Bowling Api Gateway": { "commandName": "Project", - "dotnetRunMessages": true, "launchBrowser": true, "applicationUrl": "https://localhost:7003", "environmentVariables": { @@ -26,4 +25,4 @@ } } } -} +} \ No newline at end of file diff --git a/Sources/BowlingApi/Program.cs b/Sources/BowlingApi/Program.cs index 7aa9b45..697599c 100644 --- a/Sources/BowlingApi/Program.cs +++ b/Sources/BowlingApi/Program.cs @@ -62,18 +62,13 @@ builder.Services.AddLogging(configure => var app = builder.Build(); // Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) +app.UseSwagger(); +app.UseSwaggerUI(c => { - - - app.UseSwagger(); - app.UseSwaggerUI(c => - { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "API du projet Bowling APP v1"); - c.SwaggerEndpoint("/swagger/v2/swagger.json", "API du projet Bowling APP v2"); + c.SwaggerEndpoint("/swagger/v1/swagger.json", "API du projet Bowling APP v1"); + c.SwaggerEndpoint("/swagger/v2/swagger.json", "API du projet Bowling APP v2"); - }); -} +}); app.UseRouting(); app.UseEndpoints(endpoint=>