diff --git a/src/HeartTrackAPI/Utils/AppBootstrap.cs b/src/HeartTrackAPI/Utils/AppBootstrap.cs index c629f5e..51e7e79 100644 --- a/src/HeartTrackAPI/Utils/AppBootstrap.cs +++ b/src/HeartTrackAPI/Utils/AppBootstrap.cs @@ -156,6 +156,7 @@ public class AppBootstrap(IConfiguration configuration) new List() } }; + options.AddSecurityRequirement(scheme); }); services.AddTransient, SwaggerOptions>(); @@ -187,10 +188,12 @@ public class AppBootstrap(IConfiguration configuration) { var apiVersionDescriptionProvider = app.Services.GetRequiredService(); app.UseSwagger(); - app.UseSwaggerUI(); + app.MapSwagger(); app.UseSwaggerUI(options => - { + { + if(Environment.GetEnvironmentVariable("TYPE") == "STUB") + options.RoutePrefix = "containers/HeartDev-heart_stub"; foreach (var description in apiVersionDescriptionProvider.ApiVersionDescriptions) { options.SwaggerEndpoint($"/swagger/{description.GroupName}/swagger.json",