♻️ Refactored swagger generation

This commit is contained in:
2025-09-25 23:44:43 +08:00
parent a88d828e21
commit d69c9f9623
25 changed files with 171 additions and 279 deletions

View File

@@ -17,21 +17,20 @@ builder.ConfigureAppKestrel(builder.Configuration);
builder.Services.AddAppServices(builder.Configuration);
builder.Services.AddAppRateLimiting();
builder.Services.AddAppAuthentication();
builder.Services.AddAppSwagger();
builder.Services.AddDysonAuth();
builder.Services.AddAccountService();
builder.Services.AddRingService();
builder.Services.AddDriveService();
// Add flush handlers and websocket handlers
builder.Services.AddAppFlushHandlers();
// Add business services
builder.Services.AddAppBusinessServices(builder.Configuration);
// Add scheduled jobs
builder.Services.AddAppScheduledJobs();
builder.AddSwaggerManifest(
"DysonNetwork.Sphere",
"The social network service in the Solar Network."
);
var app = builder.Build();
app.MapDefaultEndpoints();
@@ -46,4 +45,6 @@ using (var scope = app.Services.CreateScope())
// Configure application middleware pipeline
app.ConfigureAppMiddleware(builder.Configuration);
app.Run();
app.UseSwaggerManifest();
app.Run();