Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api definition: modify path for updating backup strategy, add filter type for execute status of task #2757

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -10459,6 +10459,7 @@ paths:
- terminating
- terminate_succeeded
- terminate_failed
- execute_rollback
in: query
name: filter_exec_status
type: string
Expand Down Expand Up @@ -11869,6 +11870,7 @@ paths:
summary: 获取Sql扫描任务信息
tags:
- task
/v1/tasks/audits/{task_id}/backup_strategy:
patch:
consumes:
- application/json
Expand Down Expand Up @@ -12000,6 +12002,7 @@ paths:
- succeeded
- failed
- manually_executed
- execute_rollback
in: query
name: filter_exec_status
type: string
Expand Down Expand Up @@ -12103,7 +12106,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 @@ -13037,6 +13040,7 @@ paths:
- terminating
- terminate_succeeded
- terminate_failed
- execute_rollback
in: query
name: filter_exec_status
type: string
Expand Down
Loading