Update Swagger info to LFlow

This commit is contained in:
Ling 2024-10-09 17:08:15 +08:00
parent cf5bb3bc7c
commit e3351d1934
1 changed files with 18 additions and 1 deletions

View File

@ -21,6 +21,20 @@ public static class Program
builder.Services.AddHttpContextAccessor();
builder.Services.ConfigureSqlSugar();
builder.Services.AddControllers();
builder.Services.AddSwaggerGen(u =>
{
u.SwaggerDoc("v1", new Microsoft.OpenApi.Models.OpenApiInfo
{
Version = "Ver.1",
Title = "LFlow",
Description = "LFlow api test and document",
Contact = new Microsoft.OpenApi.Models.OpenApiContact
{
Name = "ling",
Email = "noemail@ling.chat"
}
});
});
var app = builder.Build();
app.MapControllers();
@ -28,7 +42,10 @@ public static class Program
// if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
app.UseSwaggerUI(u =>
{
u.DocumentTitle = "LFlow";
});
}
app.Run();
}