|
|
@ -172,6 +172,7 @@ public class AppBootstrap(IConfiguration configuration)
|
|
|
|
|
|
|
|
|
|
|
|
public void Configure(WebApplication app, IWebHostEnvironment env)
|
|
|
|
public void Configure(WebApplication app, IWebHostEnvironment env)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
app.UsePathBase("/codefirst");
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
app.MapIdentityApi<IdentityUser>();
|
|
|
|
app.MapIdentityApi<IdentityUser>();
|
|
|
|
|
|
|
|
|
|
|
@ -183,9 +184,21 @@ public class AppBootstrap(IConfiguration configuration)
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
|
if (true)
|
|
|
|
if (true)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
var apiVersionDescriptionProvider = app.Services.GetRequiredService<IApiVersionDescriptionProvider>();
|
|
|
|
app.UseSwagger();
|
|
|
|
app.UseSwagger();
|
|
|
|
app.UseSwaggerUI();
|
|
|
|
app.UseSwaggerUI(c => {
|
|
|
|
|
|
|
|
c.SwaggerEndpoint($"./v1/swagger.json", "SapWeb v1");
|
|
|
|
|
|
|
|
});
|
|
|
|
app.MapSwagger();
|
|
|
|
app.MapSwagger();
|
|
|
|
|
|
|
|
/* app.UseSwaggerUI(options =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
foreach (var description in apiVersionDescriptionProvider.ApiVersionDescriptions)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
options.SwaggerEndpoint($"/swagger/{description.GroupName}/swagger.json",
|
|
|
|
|
|
|
|
description.GroupName.ToUpperInvariant());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});*/
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|