refactor api modules

This commit is contained in:
2025-12-22 21:45:14 +01:00
parent 1333f5e907
commit 41b27402dc
5 changed files with 474 additions and 125 deletions

View File

@@ -26,10 +26,12 @@ async function bootstrap() {
.addTag('analytics', 'Analytics and reporting endpoints')
.build();
const document = SwaggerModule.createDocument(app, config);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const document = SwaggerModule.createDocument(app as any, config);
// Serve Swagger UI at /api/docs
SwaggerModule.setup('api/docs', app, document);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
SwaggerModule.setup('api/docs', app as any, document);
// Export OpenAPI spec as JSON file when GENERATE_OPENAPI env var is set
if (process.env.GENERATE_OPENAPI) {