This commit is contained in:
D8D Developer
2025-06-27 03:31:29 +00:00
commit d371fbaefa
68 changed files with 11263 additions and 0 deletions

22
.roo/rules/04-api.md Normal file
View File

@@ -0,0 +1,22 @@
# 接口定义规范
1. **DTO定义**
- 必须包含`description`字段说明用途
- 必须包含`example`字段提供示例值
- 示例:
```typescript
export const CreateUserDto = z.object({
username: z.string().min(3).max(20).openapi({
example: 'john_doe',
description: '用户名, 3-20个字符'
}),
password: z.string().min(6).openapi({
example: 'password123',
description: '密码, 最少6位'
})
})
```
2. **API响应**
- 统一的API响应格式
- 完善的Swagger文档