|
@@ -172,7 +172,7 @@ namespace HealthMonitor.WebApi |
|
|
// Register the Swagger generator, defining 1 or more Swagger documents |
|
|
// Register the Swagger generator, defining 1 or more Swagger documents |
|
|
builder.Services.AddSwaggerGen(c => |
|
|
builder.Services.AddSwaggerGen(c => |
|
|
{ |
|
|
{ |
|
|
c.SwaggerDoc(AppConsts.SWAGGER_DOC_GpsCard, new OpenApiInfo { Title = "GpsCard模块", Version = "v1", Description = "gps_card数据库服务" }); //分组显示 |
|
|
|
|
|
|
|
|
//c.SwaggerDoc(AppConsts.SWAGGER_DOC_GpsCard, new OpenApiInfo { Title = "GpsCard模块", Version = "v1", Description = "gps_card数据库服务" }); //分组显示 |
|
|
c.SwaggerDoc(AppConsts.SWAGGER_DOC_HealthMonitor, new OpenApiInfo { Title = "HealthMonitor模块", Version = "v1", Description = "health_monitor数据库服务" }); //分组显示 |
|
|
c.SwaggerDoc(AppConsts.SWAGGER_DOC_HealthMonitor, new OpenApiInfo { Title = "HealthMonitor模块", Version = "v1", Description = "health_monitor数据库服务" }); //分组显示 |
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -221,7 +221,7 @@ namespace HealthMonitor.WebApi |
|
|
app.UseSwaggerUI(c => |
|
|
app.UseSwaggerUI(c => |
|
|
{ |
|
|
{ |
|
|
string sub = string.IsNullOrEmpty(prefix) ? "" : $"/{prefix}"; |
|
|
string sub = string.IsNullOrEmpty(prefix) ? "" : $"/{prefix}"; |
|
|
c.SwaggerEndpoint($"{sub}/{AppConsts.SWAGGER_DOC_GpsCard}/api-docs/", "GpsCard模块"); //分组显示 |
|
|
|
|
|
|
|
|
//c.SwaggerEndpoint($"{sub}/{AppConsts.SWAGGER_DOC_GpsCard}/api-docs/", "GpsCard模块"); //分组显示 |
|
|
c.SwaggerEndpoint($"{sub}/{AppConsts.SWAGGER_DOC_HealthMonitor}/api-docs/", "HealthMonitor模块"); //分组显示 |
|
|
c.SwaggerEndpoint($"{sub}/{AppConsts.SWAGGER_DOC_HealthMonitor}/api-docs/", "HealthMonitor模块"); //分组显示 |
|
|
c.RoutePrefix = string.Empty; |
|
|
c.RoutePrefix = string.Empty; |
|
|
}); |
|
|
}); |
|
|