feat: 第一次生成

This commit is contained in:
2025-05-04 20:37:40 +08:00
commit 5c01df4a93
42 changed files with 12705 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
import swaggerJsdoc from 'swagger-jsdoc';
const options: swaggerJsdoc.Options = {
definition: {
openapi: '3.0.0',
info: {
title: '百盘搜 API 文档',
version: '1.0.0',
description: '百盘搜系统的API接口文档',
contact: {
name: 'API Support',
email: 'support@example.com'
}
},
servers: [
{
url: 'http://localhost:3005',
description: '开发服务器'
}
],
components: {
securitySchemes: {
bearerAuth: {
type: 'http',
scheme: 'bearer',
bearerFormat: 'JWT'
}
}
},
security: [{
bearerAuth: []
}]
},
apis: ['./src/routes/*.ts', './src/controllers/*.ts'] // 指定API注释文件的位置
};
export const swaggerSpec = swaggerJsdoc(options);