Skip to content

Commit be8fbcd

Browse files
committed
gen swagger
1 parent 06a0610 commit be8fbcd

File tree

3 files changed

+470
-15
lines changed

3 files changed

+470
-15
lines changed

sqle/docs/docs.go

Lines changed: 176 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6340,7 +6340,7 @@ var doc = `{
63406340
"ApiKeyAuth": []
63416341
}
63426342
],
6343-
"description": "get module status for modulealities in the system",
6343+
"description": "get module status for module in the system",
63446344
"tags": [
63456345
"system"
63466346
],
@@ -8427,6 +8427,173 @@ var doc = `{
84278427
}
84288428
}
84298429
},
8430+
"sql_flash.AdvisedIndex": {
8431+
"type": "object",
8432+
"properties": {
8433+
"has_advice": {
8434+
"type": "boolean"
8435+
},
8436+
"indexes": {
8437+
"type": "array",
8438+
"items": {
8439+
"$ref": "#/definitions/sql_flash.IndexInfo"
8440+
}
8441+
},
8442+
"other_advice": {
8443+
"type": "string"
8444+
},
8445+
"state": {
8446+
"type": "string"
8447+
}
8448+
}
8449+
},
8450+
"sql_flash.Analysis": {
8451+
"type": "object",
8452+
"properties": {
8453+
"detail": {
8454+
"type": "array",
8455+
"items": {
8456+
"$ref": "#/definitions/sql_flash.AnalysisDetail"
8457+
}
8458+
},
8459+
"improvement_desc": {
8460+
"type": "string"
8461+
},
8462+
"improvement_rate": {
8463+
"type": "number"
8464+
},
8465+
"state": {
8466+
"type": "string"
8467+
},
8468+
"total_score": {
8469+
"type": "number"
8470+
}
8471+
}
8472+
},
8473+
"sql_flash.AnalysisDetail": {
8474+
"type": "object",
8475+
"properties": {
8476+
"category": {
8477+
"type": "string"
8478+
},
8479+
"optimized_score": {
8480+
"type": "number"
8481+
},
8482+
"original_score": {
8483+
"type": "number"
8484+
}
8485+
}
8486+
},
8487+
"sql_flash.IndexInfo": {
8488+
"type": "object",
8489+
"properties": {
8490+
"create_index_statement": {
8491+
"type": "string"
8492+
},
8493+
"reason": {
8494+
"type": "string"
8495+
}
8496+
}
8497+
},
8498+
"sql_flash.OptimizeDetail": {
8499+
"type": "object",
8500+
"properties": {
8501+
"state": {
8502+
"type": "string"
8503+
},
8504+
"steps": {
8505+
"type": "array",
8506+
"items": {
8507+
"$ref": "#/definitions/sql_flash.OptimizeStep"
8508+
}
8509+
}
8510+
}
8511+
},
8512+
"sql_flash.OptimizeStep": {
8513+
"type": "object",
8514+
"properties": {
8515+
"analysis": {
8516+
"type": "object",
8517+
"$ref": "#/definitions/sql_flash.Analysis"
8518+
},
8519+
"chat_id": {
8520+
"type": "string"
8521+
},
8522+
"optimized_sql": {
8523+
"type": "string"
8524+
},
8525+
"query_plan": {
8526+
"type": "object",
8527+
"$ref": "#/definitions/sql_flash.QueryPlan"
8528+
},
8529+
"rule_desc": {
8530+
"type": "string"
8531+
},
8532+
"rule_id": {
8533+
"type": "string"
8534+
},
8535+
"rule_name": {
8536+
"type": "string"
8537+
}
8538+
}
8539+
},
8540+
"sql_flash.QueryPlan": {
8541+
"type": "object",
8542+
"properties": {
8543+
"query_plan_desc": {
8544+
"type": "array",
8545+
"items": {
8546+
"$ref": "#/definitions/sql_flash.QueryPlanNode"
8547+
}
8548+
},
8549+
"state": {
8550+
"type": "string"
8551+
}
8552+
}
8553+
},
8554+
"sql_flash.QueryPlanNode": {
8555+
"type": "object",
8556+
"properties": {
8557+
"children": {
8558+
"type": "array",
8559+
"items": {
8560+
"$ref": "#/definitions/sql_flash.QueryPlanNode"
8561+
}
8562+
},
8563+
"operator": {
8564+
"type": "string"
8565+
},
8566+
"summary": {
8567+
"type": "array",
8568+
"items": {
8569+
"type": "string"
8570+
}
8571+
}
8572+
}
8573+
},
8574+
"sql_flash.TotalAnalysis": {
8575+
"type": "object",
8576+
"properties": {
8577+
"detail": {
8578+
"type": "array",
8579+
"items": {
8580+
"$ref": "#/definitions/sql_flash.AnalysisDetail"
8581+
}
8582+
},
8583+
"improvement_desc": {
8584+
"type": "string"
8585+
},
8586+
"improvement_rate": {
8587+
"type": "number"
8588+
},
8589+
"state": {
8590+
"type": "string"
8591+
},
8592+
"total_score": {
8593+
"type": "number"
8594+
}
8595+
}
8596+
},
84308597
"v1.AffectRows": {
84318598
"type": "object",
84328599
"properties": {
@@ -14262,7 +14429,8 @@ var doc = `{
1426214429
"properties": {
1426314430
"advised_index": {
1426414431
"description": "索引建议详情",
14265-
"type": "string"
14432+
"type": "object",
14433+
"$ref": "#/definitions/sql_flash.AdvisedIndex"
1426614434
},
1426714435
"id": {
1426814436
"type": "integer"
@@ -14276,11 +14444,13 @@ var doc = `{
1427614444
},
1427714445
"optimize": {
1427814446
"description": "优化详情",
14279-
"type": "string"
14447+
"type": "object",
14448+
"$ref": "#/definitions/sql_flash.OptimizeDetail"
1428014449
},
1428114450
"origin_query_plan": {
1428214451
"description": "原始SQL查询计划",
14283-
"type": "string"
14452+
"type": "object",
14453+
"$ref": "#/definitions/sql_flash.QueryPlan"
1428414454
},
1428514455
"origin_sql": {
1428614456
"description": "SQL Flash相关字段",
@@ -14301,7 +14471,8 @@ var doc = `{
1430114471
},
1430214472
"total_analysis": {
1430314473
"description": "总体分析",
14304-
"type": "string"
14474+
"type": "object",
14475+
"$ref": "#/definitions/sql_flash.TotalAnalysis"
1430514476
},
1430614477
"total_state": {
1430714478
"description": "总状态",

0 commit comments

Comments
 (0)