From 840be7530ad455b51a71dcd0883f92504155d3d4 Mon Sep 17 00:00:00 2001 From: meysamhadeli Date: Wed, 16 Nov 2022 01:02:53 +0330 Subject: [PATCH] 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