feat: add swagger

This commit is contained in:
2026-05-09 18:09:57 +03:00
parent cc81d1cb98
commit 38bb15a928
2 changed files with 6 additions and 0 deletions

View File

@@ -41,9 +41,13 @@ app.get('/api/health', (_req, res) => {
});
app.use('/api/docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
app.get('/api/docs/swagger.json', (_req, res) => {
res.json(swaggerSpec);
});
app.get('/docs/swagger.json', (_req, res) => {
res.json(swaggerSpec);
});
// ── Глобальный rate limit на весь API после public endpoints ────────────────
app.use('/api', globalLimiter);