From 0644390e2750cbccd787e89f2feed506044d22d2 Mon Sep 17 00:00:00 2001 From: kelvin Date: Sun, 17 Nov 2024 18:08:10 +0300 Subject: [PATCH] fix: attempt to fix swagger ui in app service --- AdminHubApi/Program.cs | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/AdminHubApi/Program.cs b/AdminHubApi/Program.cs index 9d01b77..cd3b14e 100644 --- a/AdminHubApi/Program.cs +++ b/AdminHubApi/Program.cs @@ -97,22 +97,23 @@ var app = builder.Build(); app.UseSwagger(); +app.UseSwaggerUI(); -app.UseSwaggerUI(options => -{ - options.SwaggerEndpoint("/swagger/v1/swagger.json", "Web API V1"); - - if (app.Environment.IsDevelopment()) - { - options.RoutePrefix = "swagger"; - } - else - { - options.RoutePrefix = string.Empty; - } -}); - -app.UseSwagger(); +// app.UseSwaggerUI(options => +// { +// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Web API V1"); +// +// if (app.Environment.IsDevelopment()) +// { +// options.RoutePrefix = "swagger"; +// } +// else +// { +// options.RoutePrefix = string.Empty; +// } +// }); +// +// app.UseSwagger(); // // Configure the HTTP request pipeline. // if (app.Environment.IsDevelopment())