Adding custom swagger template

This commit is contained in:
2024-01-29 22:50:38 +01:00
parent 2696d1eb09
commit 8b66541529
6 changed files with 30 additions and 3 deletions

View File

@@ -51,8 +51,6 @@ internal class Program
});
});
// Register IConfiguration in the service container
var app = builder.Build();
@@ -67,11 +65,13 @@ internal class Program
if (app.Environment.IsDevelopment())
{
app.UseStaticFiles();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.InjectStylesheet("/swagger-ui/custom.css");
options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1");
options.RoutePrefix = string.Empty;
// options.RoutePrefix = string.Empty;
});
}