Commit Graph

3 Commits

Author SHA1 Message Date
En
0d4275b235 feat: 完善 OpenAPI 注解和前端 API 客户端
主要变更:
1. 所有 Entity/DTO/VO 添加 @Schema 注解,完善 API 文档
2. 新增前端 API 封装模块 (src/apis),包含 fetch.ts 和 apis.ts
3. 生成完整的 TypeScript 类型定义(100+ 个模型)
4. pom.xml 添加 Maven 编译配置和 UTF-8 编码支持
5. 更新 CLAUDE.md 开发文档,新增接口规范和 Swagger 注解规范
6. 清理旧的文档文件和 Flyway 迁移脚本

技术细节:
- 后端:27 个实体类 + 所有 DTO/Response 添加 Swagger 注解
- 前端:新增 orval 生成的 API 客户端类型
- 构建:配置 Maven compiler plugin 和 Spring Boot 插件的 JVM 参数
- 数据库:新增 schema 导出文件,删除旧 Flyway 迁移脚本

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:51:02 +08:00
En
745f4e4b06 feat(api): 新增自动化 API 更新工具和协作文档
- 添加 api-generator.bat/api-generator.sh 脚本,简化后端接口修改后的前端 API 同步流程
- 新增 reading-platform-frontend/README.md,说明 API 开发协作规范
- 更新 docs/开发协作指南.md,补充协作模式说明和新功能开发检查清单
- 同步最新 API 规范和生成的 TypeScript 类型代码

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 18:04:29 +08:00
2a394a4882 chore(api): 接入 orval 自动生成 API 客户端
- 新增 orval.config.ts:从 OpenAPI spec 自动生成 TypeScript 代码
- 新增 src/api/request.ts:orval mutator,复用现有 axios 实例
- 新增 src/api/generated/:自动生成的 API 函数和类型定义(106个接口,155个类型)
- 新增 api-spec.json:后端 OpenAPI 规范快照
- package.json 新增脚本:api:fetch / api:gen / api:update

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 11:03:56 +08:00