Skip to content

Commit

Permalink
docs: make swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
winfredLIN committed Nov 6, 2024
1 parent c1baafe commit 755054d
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 6 deletions.
100 changes: 98 additions & 2 deletions sqle/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6608,7 +6608,7 @@ var doc = `{
},
{
"type": "boolean",
"description": "enable back up",
"description": "enable backup",
"name": "enable_backup",
"in": "formData"
},
Expand Down Expand Up @@ -7115,6 +7115,67 @@ var doc = `{
}
}
},
"/v1/projects/{project_name}/workflows/{workflow_id}/backup_sqls": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get backup sql list",
"tags": [
"workflow"
],
"summary": "获取工单下所有回滚SQL的列表",
"operationId": "GetBackupSqlListV1",
"parameters": [
{
"enum": [
"initialized",
"doing",
"succeeded",
"failed",
"manually_executed",
"terminating",
"terminate_succeeded",
"terminate_failed"
],
"type": "string",
"description": "filter: exec status of task sql",
"name": "filter_exec_status",
"in": "query"
},
{
"type": "integer",
"description": "filter: instance id in workflow",
"name": "filter_instance_id",
"in": "query"
},
{
"type": "string",
"description": "page index",
"name": "page_index",
"in": "query",
"required": true
},
{
"type": "string",
"description": "page size",
"name": "page_size",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.BackupSqlListRes"
}
}
}
}
},
"/v1/projects/{project_name}/workflows/{workflow_id}/tasks/terminate": {
"post": {
"security": [
Expand Down Expand Up @@ -8919,7 +8980,7 @@ var doc = `{
},
{
"type": "boolean",
"description": "enable back up",
"description": "enable backup",
"name": "enable_backup",
"in": "formData"
},
Expand Down Expand Up @@ -11642,6 +11703,41 @@ var doc = `{
}
}
},
"v1.BackupSqlListRes": {
"type": "object",
"properties": {
"backup_sqls": {
"type": "array",
"items": {
"type": "string"
}
},
"backup_strategy": {
"type": "string"
},
"description": {
"type": "string"
},
"exec_order": {
"type": "integer"
},
"exec_sql_id": {
"type": "integer"
},
"exec_status": {
"type": "string"
},
"instance_id ": {
"type": "string"
},
"instance_name": {
"type": "string"
},
"origin_sql": {
"type": "string"
}
}
},
"v1.BatchAssociateWorkflowsWithVersionReqV1": {
"type": "object",
"properties": {
Expand Down
100 changes: 98 additions & 2 deletions sqle/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6592,7 +6592,7 @@
},
{
"type": "boolean",
"description": "enable back up",
"description": "enable backup",
"name": "enable_backup",
"in": "formData"
},
Expand Down Expand Up @@ -7099,6 +7099,67 @@
}
}
},
"/v1/projects/{project_name}/workflows/{workflow_id}/backup_sqls": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "get backup sql list",
"tags": [
"workflow"
],
"summary": "获取工单下所有回滚SQL的列表",
"operationId": "GetBackupSqlListV1",
"parameters": [
{
"enum": [
"initialized",
"doing",
"succeeded",
"failed",
"manually_executed",
"terminating",
"terminate_succeeded",
"terminate_failed"
],
"type": "string",
"description": "filter: exec status of task sql",
"name": "filter_exec_status",
"in": "query"
},
{
"type": "integer",
"description": "filter: instance id in workflow",
"name": "filter_instance_id",
"in": "query"
},
{
"type": "string",
"description": "page index",
"name": "page_index",
"in": "query",
"required": true
},
{
"type": "string",
"description": "page size",
"name": "page_size",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.BackupSqlListRes"
}
}
}
}
},
"/v1/projects/{project_name}/workflows/{workflow_id}/tasks/terminate": {
"post": {
"security": [
Expand Down Expand Up @@ -8903,7 +8964,7 @@
},
{
"type": "boolean",
"description": "enable back up",
"description": "enable backup",
"name": "enable_backup",
"in": "formData"
},
Expand Down Expand Up @@ -11626,6 +11687,41 @@
}
}
},
"v1.BackupSqlListRes": {
"type": "object",
"properties": {
"backup_sqls": {
"type": "array",
"items": {
"type": "string"
}
},
"backup_strategy": {
"type": "string"
},
"description": {
"type": "string"
},
"exec_order": {
"type": "integer"
},
"exec_sql_id": {
"type": "integer"
},
"exec_status": {
"type": "string"
},
"instance_id ": {
"type": "string"
},
"instance_name": {
"type": "string"
},
"origin_sql": {
"type": "string"
}
}
},
"v1.BatchAssociateWorkflowsWithVersionReqV1": {
"type": "object",
"properties": {
Expand Down
69 changes: 67 additions & 2 deletions sqle/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,29 @@ definitions:
total_sql_count:
type: integer
type: object
v1.BackupSqlListRes:
properties:
backup_sqls:
items:
type: string
type: array
backup_strategy:
type: string
description:
type: string
exec_order:
type: integer
exec_sql_id:
type: integer
exec_status:
type: string
'instance_id ':
type: string
instance_name:
type: string
origin_sql:
type: string
type: object
v1.BatchAssociateWorkflowsWithVersionReqV1:
properties:
workflow_ids:
Expand Down Expand Up @@ -10117,7 +10140,7 @@ paths:
in: formData
name: instance_schema
type: string
- description: enable back up
- description: enable backup
in: formData
name: enable_backup
type: boolean
Expand Down Expand Up @@ -10332,6 +10355,48 @@ paths:
summary: 创建工单
tags:
- workflow
/v1/projects/{project_name}/workflows/{workflow_id}/backup_sqls:
get:
description: get backup sql list
operationId: GetBackupSqlListV1
parameters:
- description: 'filter: exec status of task sql'
enum:
- initialized
- doing
- succeeded
- failed
- manually_executed
- terminating
- terminate_succeeded
- terminate_failed
in: query
name: filter_exec_status
type: string
- description: 'filter: instance id in workflow'
in: query
name: filter_instance_id
type: integer
- description: page index
in: query
name: page_index
required: true
type: string
- description: page size
in: query
name: page_size
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v1.BackupSqlListRes'
security:
- ApiKeyAuth: []
summary: 获取工单下所有回滚SQL的列表
tags:
- workflow
/v1/projects/{project_name}/workflows/{workflow_id}/tasks/{task_id}/attachment:
get:
description: get workflow attachment
Expand Down Expand Up @@ -11618,7 +11683,7 @@ paths:
in: formData
name: sql
type: string
- description: enable back up
- description: enable backup
in: formData
name: enable_backup
type: boolean
Expand Down

0 comments on commit 755054d

Please sign in to comment.