Skip to content

Commit

Permalink
Merge pull request #2757 from actiontech/1956mvp3-api-definition
Browse files Browse the repository at this point in the history
api definition: modify path for updating backup strategy, add filter type for execute status of task
  • Loading branch information
ColdWaterLW authored Nov 15, 2024
2 parents 84d7167 + 798a038 commit 7d29fef
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 16 deletions.
6 changes: 3 additions & 3 deletions sqle/api/controller/v1/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type UpdateSqlBackupStrategyReq struct {
// @Param sql_id path string true "sql id"
// @Param strategy body v1.UpdateSqlBackupStrategyReq true "update back up strategy for one sql in workflow"
// @Success 200 {object} controller.BaseRes
// @router /v1/tasks/audits/{task_id}/sqls/{sql_id}/ [patch]
// @router /v1/tasks/audits/{task_id}/sqls/{sql_id}/backup_strategy [patch]
func UpdateSqlBackupStrategy(c echo.Context) error {
return nil
}
Expand All @@ -41,7 +41,7 @@ type UpdateTaskBackupStrategyReq struct {
// @Param task_id path string true "task id"
// @Param strategy body v1.UpdateTaskBackupStrategyReq true "update back up strategy for sqls in workflow"
// @Success 200 {object} controller.BaseRes
// @router /v1/tasks/audits/{task_id}/ [patch]
// @router /v1/tasks/audits/{task_id}/backup_strategy [patch]
func UpdateTaskBackupStrategy(c echo.Context) error {
return nil
}
Expand Down Expand Up @@ -91,7 +91,7 @@ type BackupSqlListRes struct {
// @Tags workflow
// @Id GetBackupSqlListV1
// @Security ApiKeyAuth
// @Param filter_exec_status query string false "filter: exec status of task sql" Enums(initialized,doing,succeeded,failed,manually_executed,terminating,terminate_succeeded,terminate_failed)
// @Param filter_exec_status query string false "filter: exec status of task sql" Enums(initialized,doing,succeeded,failed,manually_executed,terminating,terminate_succeeded,terminate_failed,execute_rollback)
// @Param project_name path string true "project name"
// @Param workflow_id path string true "workflow id"
// @Param filter_instance_id query uint false "filter: instance id in workflow"
Expand Down
2 changes: 1 addition & 1 deletion sqle/api/controller/v1/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ type AuditTaskSQLResV1 struct {
// @Id getAuditTaskSQLsV1
// @Security ApiKeyAuth
// @Param task_id path string true "task id"
// @Param filter_exec_status query string false "filter: exec status of task sql" Enums(initialized,doing,succeeded,failed,manually_executed)
// @Param filter_exec_status query string false "filter: exec status of task sql" Enums(initialized,doing,succeeded,failed,manually_executed,execute_rollback)
// @Param filter_audit_status query string false "filter: audit status of task sql" Enums(initialized,doing,finished)
// @Param filter_audit_level query string false "filter: audit level of task sql" Enums(normal,notice,warn,error)
// @Param no_duplicate query boolean false "select unique (fingerprint and audit result) for task sql"
Expand Down
2 changes: 1 addition & 1 deletion sqle/api/controller/v2/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type AuditResult struct {
// @Id getAuditTaskSQLsV2
// @Security ApiKeyAuth
// @Param task_id path string true "task id"
// @Param filter_exec_status query string false "filter: exec status of task sql" Enums(initialized,doing,succeeded,failed,manually_executed,terminating,terminate_succeeded,terminate_failed)
// @Param filter_exec_status query string false "filter: exec status of task sql" Enums(initialized,doing,succeeded,failed,manually_executed,terminating,terminate_succeeded,terminate_failed,execute_rollback)
// @Param filter_audit_status query string false "filter: audit status of task sql" Enums(initialized,doing,finished)
// @Param filter_audit_level query string false "filter: audit level of task sql" Enums(normal,notice,warn,error)
// @Param no_duplicate query boolean false "select unique (fingerprint and audit result) for task sql"
Expand Down
15 changes: 10 additions & 5 deletions sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7144,7 +7144,8 @@ var doc = `{
"manually_executed",
"terminating",
"terminate_succeeded",
"terminate_failed"
"terminate_failed",
"execute_rollback"
],
"type": "string",
"description": "filter: exec status of task sql",
Expand Down Expand Up @@ -9123,7 +9124,9 @@ var doc = `{
}
}
}
},
}
},
"/v1/tasks/audits/{task_id}/backup_strategy": {
"patch": {
"security": [
{
Expand Down Expand Up @@ -9331,7 +9334,8 @@ var doc = `{
"doing",
"succeeded",
"failed",
"manually_executed"
"manually_executed",
"execute_rollback"
],
"type": "string",
"description": "filter: exec status of task sql",
Expand Down Expand Up @@ -9482,7 +9486,7 @@ var doc = `{
}
}
},
"/v1/tasks/audits/{task_id}/sqls/{sql_id}/": {
"/v1/tasks/audits/{task_id}/sqls/{sql_id}/backup_strategy": {
"patch": {
"security": [
{
Expand Down Expand Up @@ -10918,7 +10922,8 @@ var doc = `{
"manually_executed",
"terminating",
"terminate_succeeded",
"terminate_failed"
"terminate_failed",
"execute_rollback"
],
"type": "string",
"description": "filter: exec status of task sql",
Expand Down
15 changes: 10 additions & 5 deletions sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7128,7 +7128,8 @@
"manually_executed",
"terminating",
"terminate_succeeded",
"terminate_failed"
"terminate_failed",
"execute_rollback"
],
"type": "string",
"description": "filter: exec status of task sql",
Expand Down Expand Up @@ -9107,7 +9108,9 @@
}
}
}
},
}
},
"/v1/tasks/audits/{task_id}/backup_strategy": {
"patch": {
"security": [
{
Expand Down Expand Up @@ -9315,7 +9318,8 @@
"doing",
"succeeded",
"failed",
"manually_executed"
"manually_executed",
"execute_rollback"
],
"type": "string",
"description": "filter: exec status of task sql",
Expand Down Expand Up @@ -9466,7 +9470,7 @@
}
}
},
"/v1/tasks/audits/{task_id}/sqls/{sql_id}/": {
"/v1/tasks/audits/{task_id}/sqls/{sql_id}/backup_strategy": {
"patch": {
"security": [
{
Expand Down Expand Up @@ -10902,7 +10906,8 @@
"manually_executed",
"terminating",
"terminate_succeeded",
"terminate_failed"
"terminate_failed",
"execute_rollback"
],
"type": "string",
"description": "filter: exec status of task sql",
Expand Down
6 changes: 5 additions & 1 deletion sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10461,6 +10461,7 @@ paths:
- terminating
- terminate_succeeded
- terminate_failed
- execute_rollback
in: query
name: filter_exec_status
type: string
Expand Down Expand Up @@ -11871,6 +11872,7 @@ paths:
summary: 获取Sql扫描任务信息
tags:
- task
/v1/tasks/audits/{task_id}/backup_strategy:
patch:
consumes:
- application/json
Expand Down Expand Up @@ -12002,6 +12004,7 @@ paths:
- succeeded
- failed
- manually_executed
- execute_rollback
in: query
name: filter_exec_status
type: string
Expand Down Expand Up @@ -12105,7 +12108,7 @@ paths:
summary: 获取task相关的SQL执行计划和表元数据
tags:
- task
/v1/tasks/audits/{task_id}/sqls/{sql_id}/:
/v1/tasks/audits/{task_id}/sqls/{sql_id}/backup_strategy:
patch:
consumes:
- application/json
Expand Down Expand Up @@ -13039,6 +13042,7 @@ paths:
- terminating
- terminate_succeeded
- terminate_failed
- execute_rollback
in: query
name: filter_exec_status
type: string
Expand Down

0 comments on commit 7d29fef

Please sign in to comment.