From ce99685034bc18124aae97bb8402949283edad30 Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 18 Mar 2024 22:31:49 +0100 Subject: [PATCH] test to fix 404 --- src/HeartTrackAPI/Utils/AppBootstrap.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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",