Skip to content

fix(api): update workflow_template endpoint to use path parameter for…#3276

Merged
LordofAvernus merged 1 commit intomainfrom
sqle/feat-784
Apr 27, 2026
Merged

fix(api): update workflow_template endpoint to use path parameter for…#3276
LordofAvernus merged 1 commit intomainfrom
sqle/feat-784

Conversation

@iwanghc
Copy link
Copy Markdown
Collaborator

@iwanghc iwanghc commented Apr 27, 2026

User description

… workflow_type

关联的 issue

https://github.com/actiontech/dms-ee/issues/784

描述你的变更

修复AI编写的功能缺陷:
更新模板时,传入更新模板的类型


Description

  • 修改工作流模板使用路径参数

  • 更新Swagger接口文档说明

  • 调整API路由定义信息


Diagram Walkthrough

flowchart LR
  A["API路由更新"]
  B["控制器更新"]
  C["文档修改"]
  A -- "触发更新" --> B
  A -- "同步修改" --> C
Loading

File Walkthrough

Relevant files
Bug fix
app.go
修改API路由路径参数                                                                                           

sqle/api/app.go

  • 更新workflow_template路由
  • 将workflow_type参数移至路径
+1/-1     
Documentation
workflow.go
调整控制器注释信息                                                                                               

sqle/api/controller/v1/workflow.go

  • 修改注释参数位置
  • 更新swagger注释信息
+2/-2     
docs.go
更新API文档代码                                                                                               

sqle/docs/docs.go

  • 新增patch路由定义
  • 修改参数说明及位置
+5/-3     
swagger.json
更新JSON格式Swagger文档                                                                               

sqle/docs/swagger.json

  • 调整patch接口路径
  • 更新workflow_type参数位置
+5/-3     
swagger.yaml
更新YAML格式Swagger文档                                                                               

sqle/docs/swagger.yaml

  • 添加新版patch接口路径
  • 修改参数描述与位置
+3/-2     

@iwanghc iwanghc self-assigned this Apr 27, 2026
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

🎫 Ticket compliance analysis 🔶

784 - Partially compliant

Compliant requirements:

  • 修改工作流模板使用路径参数
  • 更新Swagger接口文档说明
  • 调整API路由定义信息

Non-compliant requirements:

Requires further human verification:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions
Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
统一路由斜杠格式

请确认此路由定义中末尾斜杠的必要性,并确保与项目中其他路由保持格式一致,避免因斜杠问题导致路由匹配意外失败。建议与文档中描述保持一致。

sqle/api/app.go [202]

-v1OpProjectRouter.PATCH("/:project_name/workflow_template/:workflow_type/", v1.UpdateWorkflowTemplate)
+v1OpProjectRouter.PATCH("/:project_name/workflow_template/:workflow_type", v1.UpdateWorkflowTemplate)
Suggestion importance[1-10]: 5

__

Why: The suggestion recommends removing the trailing slash in the API route to align with other routes and documentation. This is a style/consistency improvement with minor impact.

Low
调整文档路径格式

请检查该API文档中定义的路由路径,确保与实际代码中的路由一致,建议移除末尾多余的斜杠以防止接口描述与实际匹配不符。

sqle/docs/swagger.json [7580]

-"/v1/projects/{project_name}/workflow_template/{workflow_type}/": {
+"/v1/projects/{project_name}/workflow_template/{workflow_type}": {
Suggestion importance[1-10]: 5

__

Why: The suggestion aims to remove an extraneous trailing slash from the documented endpoint, improving consistency between the code and swagger documentation. Its impact is mainly cosmetic.

Low
统一文档路径格式

建议对swagger.yaml文件中的路由定义进行调整,与实际API路由保持一致,避免因为末尾斜杠的差异引起文档与实现不匹配。

sqle/docs/swagger.yaml [12977]

-/v1/projects/{project_name}/workflow_template/{workflow_type}/:
+/v1/projects/{project_name}/workflow_template/{workflow_type}:
Suggestion importance[1-10]: 5

__

Why: The suggestion adjusts the route in the swagger.yaml file by removing the trailing slash, ensuring consistency with the implemented API endpoints. This is a minor improvement in documentation clarity.

Low

@LordofAvernus LordofAvernus merged commit b3b8040 into main Apr 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants