From 2dfcf1a8570766d77097ebaede54a580d22cdbbe Mon Sep 17 00:00:00 2001 From: Meysam Hadeli <35596795+meysamhadeli@users.noreply.github.com> Date: Wed, 16 Nov 2022 00:43:59 +0330 Subject: [PATCH 1/2] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3667fac..2ecaebc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,7 +16,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Restore dependencies run: dotnet restore - name: Build From 840be7530ad455b51a71dcd0883f92504155d3d4 Mon Sep 17 00:00:00 2001 From: meysamhadeli Date: Wed, 16 Nov 2022 01:02:53 +0330 Subject: [PATCH 2/2] fix problem in versioning registration --- src/Services/Booking/src/Booking.Api/Program.cs | 10 +++++----- src/Services/Flight/src/Flight.Api/Program.cs | 12 ++++++------ src/Services/Identity/src/Identity.Api/Program.cs | 10 +++++----- src/Services/Passenger/src/Passenger.Api/Program.cs | 10 +++++----- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Services/Booking/src/Booking.Api/Program.cs b/src/Services/Booking/src/Booking.Api/Program.cs index 9f40e32..81e0a81 100644 --- a/src/Services/Booking/src/Booking.Api/Program.cs +++ b/src/Services/Booking/src/Booking.Api/Program.cs @@ -58,11 +58,6 @@ builder.AddMinimalEndpoints(); var app = builder.Build(); -if (app.Environment.IsDevelopment()) -{ - app.UseCustomSwagger(); -} - app.UseSerilogRequestLogging(); app.UseCorrelationId(); app.UseRouting(); @@ -82,6 +77,11 @@ app.UseEndpoints(endpoints => app.MapGet("/", x => x.Response.WriteAsync(appOptions.Name)); +if (app.Environment.IsDevelopment()) +{ + app.UseCustomSwagger(); +} + app.Run(); namespace Booking.Api diff --git a/src/Services/Flight/src/Flight.Api/Program.cs b/src/Services/Flight/src/Flight.Api/Program.cs index 6f11429..ecfddc2 100644 --- a/src/Services/Flight/src/Flight.Api/Program.cs +++ b/src/Services/Flight/src/Flight.Api/Program.cs @@ -69,11 +69,6 @@ builder.AddMinimalEndpoints(); var app = builder.Build(); -if (app.Environment.IsDevelopment()) -{ - app.UseCustomSwagger(); -} - app.UseSerilogRequestLogging(); app.UseCorrelationId(); app.UseRouting(); @@ -85,7 +80,6 @@ app.UseCustomHealthCheck(); app.UseAuthentication(); app.UseAuthorization(); - app.MapMinimalEndpoints(); app.UseEndpoints(endpoints => @@ -95,6 +89,12 @@ app.UseEndpoints(endpoints => }); app.MapGet("/", x => x.Response.WriteAsync(appOptions.Name)); + +if (app.Environment.IsDevelopment()) +{ + app.UseCustomSwagger(); +} + app.Run(); namespace Flight.Api diff --git a/src/Services/Identity/src/Identity.Api/Program.cs b/src/Services/Identity/src/Identity.Api/Program.cs index f8cbf97..9a9c46d 100644 --- a/src/Services/Identity/src/Identity.Api/Program.cs +++ b/src/Services/Identity/src/Identity.Api/Program.cs @@ -51,11 +51,6 @@ builder.AddMinimalEndpoints(); var app = builder.Build(); -if (app.Environment.IsDevelopment()) -{ - app.UseCustomSwagger(); -} - app.UseSerilogRequestLogging(); app.UseMigration(env); app.UseCorrelationId(); @@ -78,6 +73,11 @@ app.UseEndpoints(endpoints => app.MapGet("/", x => x.Response.WriteAsync(appOptions.Name)); +if (app.Environment.IsDevelopment()) +{ + app.UseCustomSwagger(); +} + app.Run(); namespace Identity.Api diff --git a/src/Services/Passenger/src/Passenger.Api/Program.cs b/src/Services/Passenger/src/Passenger.Api/Program.cs index e4abcb5..fc15fbf 100644 --- a/src/Services/Passenger/src/Passenger.Api/Program.cs +++ b/src/Services/Passenger/src/Passenger.Api/Program.cs @@ -57,11 +57,6 @@ builder.AddMinimalEndpoints(); var app = builder.Build(); -if (app.Environment.IsDevelopment()) -{ - app.UseCustomSwagger(); -} - app.UseSerilogRequestLogging(); app.UseMigration(env); app.UseCorrelationId(); @@ -83,6 +78,11 @@ app.UseEndpoints(endpoints => app.MapGet("/", x => x.Response.WriteAsync(appOptions.Name)); +if (app.Environment.IsDevelopment()) +{ + app.UseCustomSwagger(); +} + app.Run(); namespace Passenger.Api