Skip to content

Commit a854b9b

Browse files
committed
gen swagger: audit plan and sql manage add error message and modify summary
1 parent 79cd92d commit a854b9b

File tree

4 files changed

+241
-1
lines changed

4 files changed

+241
-1
lines changed

sqle/api/controller/v1/sql_manage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ type AbnormalAuditPlanInstance struct {
539539
}
540540

541541
// GetAbnormalInstanceAuditPlans get the instance of audit plan execution abnormal
542-
// @Summary 获取执行的扫描任务实例
542+
// @Summary 获取执行异常的扫描任务实例
543543
// @Description get the instance of audit plan execution abnormal
544544
// @Id getAbnormalInstanceAuditPlansV1
545545
// @Tags SqlManage

sqle/docs/docs.go

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5183,6 +5183,38 @@ var doc = `{
51835183
}
51845184
}
51855185
},
5186+
"/v1/projects/{project_name}/sql_manages/abnormal_audit_plan_instance": {
5187+
"get": {
5188+
"security": [
5189+
{
5190+
"ApiKeyAuth": []
5191+
}
5192+
],
5193+
"description": "get the instance of audit plan execution abnormal",
5194+
"tags": [
5195+
"SqlManage"
5196+
],
5197+
"summary": "获取执行异常的扫描任务实例",
5198+
"operationId": "getAbnormalInstanceAuditPlansV1",
5199+
"parameters": [
5200+
{
5201+
"type": "string",
5202+
"description": "project name",
5203+
"name": "project_name",
5204+
"in": "path",
5205+
"required": true
5206+
}
5207+
],
5208+
"responses": {
5209+
"200": {
5210+
"description": "OK",
5211+
"schema": {
5212+
"$ref": "#/definitions/v1.GetAbnormalAuditPlanInstancesResp"
5213+
}
5214+
}
5215+
}
5216+
}
5217+
},
51865218
"/v1/projects/{project_name}/sql_manages/batch": {
51875219
"patch": {
51885220
"security": [
@@ -11479,6 +11511,18 @@ var doc = `{
1147911511
}
1148011512
}
1148111513
},
11514+
"v1.AbnormalAuditPlanInstance": {
11515+
"type": "object",
11516+
"properties": {
11517+
"instance_audit_plan_id": {
11518+
"type": "integer"
11519+
},
11520+
"instance_name": {
11521+
"type": "string",
11522+
"example": "MySQL"
11523+
}
11524+
}
11525+
},
1148211526
"v1.AffectRows": {
1148311527
"type": "object",
1148411528
"properties": {
@@ -11873,12 +11917,26 @@ var doc = `{
1187311917
"v1.AuditPlanTypeResBase": {
1187411918
"type": "object",
1187511919
"properties": {
11920+
"active_status": {
11921+
"type": "string",
11922+
"enum": [
11923+
"normal",
11924+
"disabled"
11925+
]
11926+
},
1187611927
"audit_plan_id": {
1187711928
"type": "integer"
1187811929
},
1187911930
"desc": {
1188011931
"type": "string"
1188111932
},
11933+
"last_collection_status": {
11934+
"type": "string",
11935+
"enum": [
11936+
"normal",
11937+
"abnormal"
11938+
]
11939+
},
1188211940
"token": {
1188311941
"type": "string"
1188411942
},
@@ -13574,6 +13632,25 @@ var doc = `{
1357413632
}
1357513633
}
1357613634
},
13635+
"v1.GetAbnormalAuditPlanInstancesResp": {
13636+
"type": "object",
13637+
"properties": {
13638+
"code": {
13639+
"type": "integer",
13640+
"example": 0
13641+
},
13642+
"data": {
13643+
"type": "array",
13644+
"items": {
13645+
"$ref": "#/definitions/v1.AbnormalAuditPlanInstance"
13646+
}
13647+
},
13648+
"message": {
13649+
"type": "string",
13650+
"example": "ok"
13651+
}
13652+
}
13653+
},
1357713654
"v1.GetAuditPlanAnalysisDataResV1": {
1357813655
"type": "object",
1357913656
"properties": {
@@ -15877,6 +15954,13 @@ var doc = `{
1587715954
"id": {
1587815955
"type": "integer"
1587915956
},
15957+
"last_collection_status": {
15958+
"type": "string",
15959+
"enum": [
15960+
"normal",
15961+
"abnormal"
15962+
]
15963+
},
1588015964
"last_collection_time": {
1588115965
"type": "string"
1588215966
},
@@ -19916,6 +20000,9 @@ var doc = `{
1991620000
"items": {
1991720001
"$ref": "#/definitions/v2.AuditPlanSQLReqV2"
1991820002
}
20003+
},
20004+
"error_message": {
20005+
"type": "string"
1991920006
}
1992020007
}
1992120008
},
@@ -20472,6 +20559,9 @@ var doc = `{
2047220559
"items": {
2047320560
"$ref": "#/definitions/v2.AuditPlanSQLReqV2"
2047420561
}
20562+
},
20563+
"error_message": {
20564+
"type": "string"
2047520565
}
2047620566
}
2047720567
},

sqle/docs/swagger.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5167,6 +5167,38 @@
51675167
}
51685168
}
51695169
},
5170+
"/v1/projects/{project_name}/sql_manages/abnormal_audit_plan_instance": {
5171+
"get": {
5172+
"security": [
5173+
{
5174+
"ApiKeyAuth": []
5175+
}
5176+
],
5177+
"description": "get the instance of audit plan execution abnormal",
5178+
"tags": [
5179+
"SqlManage"
5180+
],
5181+
"summary": "获取执行异常的扫描任务实例",
5182+
"operationId": "getAbnormalInstanceAuditPlansV1",
5183+
"parameters": [
5184+
{
5185+
"type": "string",
5186+
"description": "project name",
5187+
"name": "project_name",
5188+
"in": "path",
5189+
"required": true
5190+
}
5191+
],
5192+
"responses": {
5193+
"200": {
5194+
"description": "OK",
5195+
"schema": {
5196+
"$ref": "#/definitions/v1.GetAbnormalAuditPlanInstancesResp"
5197+
}
5198+
}
5199+
}
5200+
}
5201+
},
51705202
"/v1/projects/{project_name}/sql_manages/batch": {
51715203
"patch": {
51725204
"security": [
@@ -11463,6 +11495,18 @@
1146311495
}
1146411496
}
1146511497
},
11498+
"v1.AbnormalAuditPlanInstance": {
11499+
"type": "object",
11500+
"properties": {
11501+
"instance_audit_plan_id": {
11502+
"type": "integer"
11503+
},
11504+
"instance_name": {
11505+
"type": "string",
11506+
"example": "MySQL"
11507+
}
11508+
}
11509+
},
1146611510
"v1.AffectRows": {
1146711511
"type": "object",
1146811512
"properties": {
@@ -11857,12 +11901,26 @@
1185711901
"v1.AuditPlanTypeResBase": {
1185811902
"type": "object",
1185911903
"properties": {
11904+
"active_status": {
11905+
"type": "string",
11906+
"enum": [
11907+
"normal",
11908+
"disabled"
11909+
]
11910+
},
1186011911
"audit_plan_id": {
1186111912
"type": "integer"
1186211913
},
1186311914
"desc": {
1186411915
"type": "string"
1186511916
},
11917+
"last_collection_status": {
11918+
"type": "string",
11919+
"enum": [
11920+
"normal",
11921+
"abnormal"
11922+
]
11923+
},
1186611924
"token": {
1186711925
"type": "string"
1186811926
},
@@ -13558,6 +13616,25 @@
1355813616
}
1355913617
}
1356013618
},
13619+
"v1.GetAbnormalAuditPlanInstancesResp": {
13620+
"type": "object",
13621+
"properties": {
13622+
"code": {
13623+
"type": "integer",
13624+
"example": 0
13625+
},
13626+
"data": {
13627+
"type": "array",
13628+
"items": {
13629+
"$ref": "#/definitions/v1.AbnormalAuditPlanInstance"
13630+
}
13631+
},
13632+
"message": {
13633+
"type": "string",
13634+
"example": "ok"
13635+
}
13636+
}
13637+
},
1356113638
"v1.GetAuditPlanAnalysisDataResV1": {
1356213639
"type": "object",
1356313640
"properties": {
@@ -15861,6 +15938,13 @@
1586115938
"id": {
1586215939
"type": "integer"
1586315940
},
15941+
"last_collection_status": {
15942+
"type": "string",
15943+
"enum": [
15944+
"normal",
15945+
"abnormal"
15946+
]
15947+
},
1586415948
"last_collection_time": {
1586515949
"type": "string"
1586615950
},
@@ -19900,6 +19984,9 @@
1990019984
"items": {
1990119985
"$ref": "#/definitions/v2.AuditPlanSQLReqV2"
1990219986
}
19987+
},
19988+
"error_message": {
19989+
"type": "string"
1990319990
}
1990419991
}
1990519992
},
@@ -20456,6 +20543,9 @@
2045620543
"items": {
2045720544
"$ref": "#/definitions/v2.AuditPlanSQLReqV2"
2045820545
}
20546+
},
20547+
"error_message": {
20548+
"type": "string"
2045920549
}
2046020550
}
2046120551
},

0 commit comments

Comments
 (0)