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 according to front end feedbacks #2747

Merged
merged 2 commits into from
Nov 12, 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
8 changes: 4 additions & 4 deletions sqle/api/controller/v1/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

type UpdateSqlBackupStrategyReq struct {
Strategy string `json:"strategy" enum:"none,manual,reverse_sql,origin_row"`
Strategy string `json:"strategy" enums:"none,manual,reverse_sql,origin_row"`
}

// UpdateSqlBackupStrategy
Expand All @@ -27,7 +27,7 @@ func UpdateSqlBackupStrategy(c echo.Context) error {
}

type UpdateTaskBackupStrategyReq struct {
Strategy string `json:"strategy" enum:"none,manual,reverse_sql,origin_row"`
Strategy string `json:"strategy" enums:"none,manual,reverse_sql,origin_row"`
}

// UpdateTaskBackupStrategy
Expand Down Expand Up @@ -72,9 +72,9 @@ type BackupSqlData struct {
ExecSqlID uint `json:"exec_sql_id"`
OriginSQL string `json:"origin_sql"`
BackupSqls []string `json:"backup_sqls"`
BackupStrategy string `json:"backup_strategy" enum:"none,manual,reverse_sql,origin_row"`
BackupStrategy string `json:"backup_strategy" enums:"none,manual,reverse_sql,origin_row"`
InstanceName string `json:"instance_name"`
InstanceId string `json:"instance_id "`
InstanceId string `json:"instance_id"`
ExecStatus string `json:"exec_status"`
Description string `json:"description"`
}
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 @@ -41,7 +41,7 @@ type AuditTaskSQLResV2 struct {
RollbackSQL string `json:"rollback_sql,omitempty"`
Description string `json:"description"`
SQLType string `json:"sql_type"`
BackupStrategy string `json:"backup_strategy" enum:"none,manual,reverse_sql,origin_row"`
BackupStrategy string `json:"backup_strategy" enums:"none,manual,reverse_sql,origin_row"`
BackupStrategyTip string `json:"backup_strategy_tip"`
AssociatedWorkflowIds []string `json:"associate_workflow_ids"`
}
Expand Down
34 changes: 29 additions & 5 deletions sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -11781,7 +11781,13 @@ var doc = `{
}
},
"backup_strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
},
"description": {
"type": "string"
Expand All @@ -11795,7 +11801,7 @@ var doc = `{
"exec_status": {
"type": "string"
},
"instance_id ": {
"instance_id": {
"type": "string"
},
"instance_name": {
Expand Down Expand Up @@ -17549,7 +17555,13 @@ var doc = `{
"type": "object",
"properties": {
"strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
}
}
},
Expand Down Expand Up @@ -17632,7 +17644,13 @@ var doc = `{
"type": "object",
"properties": {
"strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
}
}
},
Expand Down Expand Up @@ -18741,7 +18759,13 @@ var doc = `{
"type": "string"
},
"backup_strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
},
"backup_strategy_tip": {
"type": "string"
Expand Down
34 changes: 29 additions & 5 deletions sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -11765,7 +11765,13 @@
}
},
"backup_strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
},
"description": {
"type": "string"
Expand All @@ -11779,7 +11785,7 @@
"exec_status": {
"type": "string"
},
"instance_id ": {
"instance_id": {
"type": "string"
},
"instance_name": {
Expand Down Expand Up @@ -17533,7 +17539,13 @@
"type": "object",
"properties": {
"strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
}
}
},
Expand Down Expand Up @@ -17616,7 +17628,13 @@
"type": "object",
"properties": {
"strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
}
}
},
Expand Down Expand Up @@ -18725,7 +18743,13 @@
"type": "string"
},
"backup_strategy": {
"type": "string"
"type": "string",
"enum": [
"none",
"manual",
"reverse_sql",
"origin_row"
]
},
"backup_strategy_tip": {
"type": "string"
Expand Down
22 changes: 21 additions & 1 deletion sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,11 @@ definitions:
type: string
type: array
backup_strategy:
enum:
- none
- manual
- reverse_sql
- origin_row
type: string
description:
type: string
Expand All @@ -502,7 +507,7 @@ definitions:
type: integer
exec_status:
type: string
'instance_id ':
instance_id:
type: string
instance_name:
type: string
Expand Down Expand Up @@ -4427,6 +4432,11 @@ definitions:
v1.UpdateSqlBackupStrategyReq:
properties:
strategy:
enum:
- none
- manual
- reverse_sql
- origin_row
type: string
type: object
v1.UpdateSqlFileOrderV1Req:
Expand Down Expand Up @@ -4482,6 +4492,11 @@ definitions:
v1.UpdateTaskBackupStrategyReq:
properties:
strategy:
enum:
- none
- manual
- reverse_sql
- origin_row
type: string
type: object
v1.UpdateWechatConfigurationReqV1:
Expand Down Expand Up @@ -5245,6 +5260,11 @@ definitions:
audit_status:
type: string
backup_strategy:
enum:
- none
- manual
- reverse_sql
- origin_row
type: string
backup_strategy_tip:
type: string
Expand Down
Loading