feat: add Swagger OpenAPI documentation endpoints
This commit is contained in:
@@ -3,6 +3,7 @@ import { startBot } from './bot';
|
||||
import { config } from './env';
|
||||
import { handleFileInfo, handleFileRedirect } from './routes/files';
|
||||
import { handleHealth } from './routes/health';
|
||||
import { handleSwaggerHtml, handleSwaggerJson } from './routes/swagger';
|
||||
import { handleUpload } from './routes/upload';
|
||||
import logger from './utils/logger';
|
||||
import { cleanupRateLimitCache } from './utils/rateLimit';
|
||||
@@ -22,6 +23,12 @@ const server = serve({
|
||||
'/health': {
|
||||
GET: handleHealth,
|
||||
},
|
||||
'/docs': {
|
||||
GET: handleSwaggerHtml,
|
||||
},
|
||||
'/swagger.json': {
|
||||
GET: handleSwaggerJson,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user