Commit Graph

15 Commits

Author SHA1 Message Date
Rogee
439456b6ad fix: 恢复 gen route 的 model 参数渲染到 f2a8b98 实现
- 恢复 buildParamToken 函数的直接实现,移除复杂的 builder 模式
- 恢复 buildRenderData 函数的简单实现,提高代码可读性
- 恢复 Render 函数的基础实现,移除过度工程化的验证逻辑
- 修复路由分组路径问题:移除 buildResult 中错误的路径覆盖逻辑
- 当使用 model() 绑定时生成完整的数据库查询函数代码

此提交将 gen route 功能恢复到 commit f2a8b9876e
的实现方式,确保 model 参数渲染符合原始设计。

修复问题:
- 修复路由生成时 "open /v1/medias/routes.gen.go: no such file or directory" 错误
- 确保 model 参数正确生成完整的数据库查询代码而非简化接口
2025-09-22 19:01:40 +08:00
Rogee
a8eb9e0025 fix: gen provider 2025-09-22 14:16:22 +08:00
Rogee
824861c27c feat: Refactor AST generation routes workflow
- Introduced a comprehensive data model for route definitions, parameters, and validation rules.
- Established component interfaces for route parsing, comment parsing, import resolution, route building, validation, and rendering.
- Developed a detailed implementation plan outlining execution flow, user requirements, and compliance with design principles.
- Created a quickstart guide to assist users in utilizing the refactored system effectively.
- Conducted thorough research on existing architecture, identifying key improvements and establishing a refactoring strategy.
- Specified functional requirements and user scenarios to ensure clarity and testability.
- Generated a task list for implementation, emphasizing test-driven development and parallel execution where applicable.
2025-09-22 11:33:13 +08:00
Rogee
f2a8b9876e update route 2025-09-11 22:40:00 +08:00
Rogee
76c7592f26 feat: 添加对 @Bind 注释中 model 字段的支持,优化路径参数绑定逻辑并更新文档 2025-09-11 20:10:24 +08:00
Rogee
b93c7726f2 feat: 更新 @Bind 注释语法,移除 table 参数,优化文档内容 2025-09-11 19:28:51 +08:00
Rogee
0d05d70fb1 feat: 更新模块路径为 v2,修正文档和代码中的相关引用 2025-09-10 14:54:16 +08:00
Rogee
0a420a2987 feat: modify pkg name 2025-02-11 15:38:59 +08:00
Rogee
1e03cf6038 feat: update route generate 2025-01-15 10:44:07 +08:00
Rogee
36e52541dd fix: param 2025-01-10 16:15:50 +08:00
Rogee
9d6edc60a9 fix: params order 2025-01-10 16:00:17 +08:00
Rogee
e66049da6c fix: bind issues 2025-01-10 15:56:31 +08:00
Rogee
77e36d5aaf feat: add swag tool 2024-12-25 16:18:41 +08:00
Rogee
5c67f87683 fix: gen routes 2024-12-23 16:00:11 +08:00
Rogee
8ff0f683c1 feat: add route render 2024-12-20 20:47:19 +08:00