Skip to content

Commit 44b92a5

Browse files
committed
ref: Adjust Swagger format
1 parent 05addd4 commit 44b92a5

File tree

3 files changed

+131
-79
lines changed

3 files changed

+131
-79
lines changed

agent/app/api/v2/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func (b *BaseApi) GetAppListUpdate(c *gin.Context) {
200200
// @Summary Get app icon by app_id
201201
// @Accept json
202202
// @Param appId path integer true "app id"
203-
// @Success 200 {string} file "app icon"
203+
// @Success 200 {file} file "app icon"
204204
// @Security ApiKeyAuth
205205
// @Security Timestamp
206206
// @Router /apps/icon/:appId [get]

core/cmd/server/docs/docs.go

Lines changed: 65 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ const docTemplate = `{
849849
"200": {
850850
"description": "app icon",
851851
"schema": {
852-
"type": "string"
852+
"type": "file"
853853
}
854854
}
855855
},
@@ -23600,6 +23600,9 @@ const docTemplate = `{
2360023600
"cpuLogicalCores": {
2360123601
"type": "integer"
2360223602
},
23603+
"cpuMhz": {
23604+
"type": "number"
23605+
},
2360323606
"cpuModelName": {
2360423607
"type": "string"
2360523608
},
@@ -23636,6 +23639,9 @@ const docTemplate = `{
2363623639
"platformVersion": {
2363723640
"type": "string"
2363823641
},
23642+
"prettyDistro": {
23643+
"type": "string"
23644+
},
2363923645
"quickJump": {
2364023646
"items": {
2364123647
"$ref": "#/definitions/dto.QuickJump"
@@ -23656,6 +23662,12 @@ const docTemplate = `{
2365623662
},
2365723663
"dto.DashboardCurrent": {
2365823664
"properties": {
23665+
"cpuDetailedPercent": {
23666+
"items": {
23667+
"type": "number"
23668+
},
23669+
"type": "array"
23670+
},
2365923671
"cpuPercent": {
2366023672
"items": {
2366123673
"type": "number"
@@ -23925,6 +23937,9 @@ const docTemplate = `{
2392523937
"id": {
2392623938
"type": "integer"
2392723939
},
23940+
"initialDB": {
23941+
"type": "string"
23942+
},
2392823943
"name": {
2392923944
"maxLength": 256,
2393023945
"type": "string"
@@ -24054,6 +24069,9 @@ const docTemplate = `{
2405424069
"id": {
2405524070
"type": "integer"
2405624071
},
24072+
"initialDB": {
24073+
"type": "string"
24074+
},
2405724075
"password": {
2405824076
"type": "string"
2405924077
},
@@ -24574,40 +24592,6 @@ const docTemplate = `{
2457424592
},
2457524593
"type": "object"
2457624594
},
24577-
"dto.GPUMemoryUsageHelper": {
24578-
"properties": {
24579-
"gpuProcesses": {
24580-
"items": {
24581-
"$ref": "#/definitions/dto.GPUProcess"
24582-
},
24583-
"type": "array"
24584-
},
24585-
"percent": {
24586-
"type": "number"
24587-
},
24588-
"total": {
24589-
"type": "number"
24590-
},
24591-
"used": {
24592-
"type": "number"
24593-
}
24594-
},
24595-
"type": "object"
24596-
},
24597-
"dto.GPUPowerUsageHelper": {
24598-
"properties": {
24599-
"percent": {
24600-
"type": "number"
24601-
},
24602-
"total": {
24603-
"type": "number"
24604-
},
24605-
"used": {
24606-
"type": "number"
24607-
}
24608-
},
24609-
"type": "object"
24610-
},
2461124595
"dto.GPUProcess": {
2461224596
"properties": {
2461324597
"pid": {
@@ -25363,21 +25347,54 @@ const docTemplate = `{
2536325347
},
2536425348
"type": "array"
2536525349
},
25350+
"gpuProcesses": {
25351+
"items": {
25352+
"items": {
25353+
"$ref": "#/definitions/dto.GPUProcess"
25354+
},
25355+
"type": "array"
25356+
},
25357+
"type": "array"
25358+
},
2536625359
"gpuValue": {
2536725360
"items": {
2536825361
"type": "number"
2536925362
},
2537025363
"type": "array"
2537125364
},
25372-
"memoryValue": {
25365+
"memoryPercent": {
25366+
"items": {
25367+
"type": "number"
25368+
},
25369+
"type": "array"
25370+
},
25371+
"memoryTotal": {
25372+
"items": {
25373+
"type": "number"
25374+
},
25375+
"type": "array"
25376+
},
25377+
"memoryUsed": {
2537325378
"items": {
25374-
"$ref": "#/definitions/dto.GPUMemoryUsageHelper"
25379+
"type": "number"
2537525380
},
2537625381
"type": "array"
2537725382
},
25378-
"powerValue": {
25383+
"powerPercent": {
2537925384
"items": {
25380-
"$ref": "#/definitions/dto.GPUPowerUsageHelper"
25385+
"type": "number"
25386+
},
25387+
"type": "array"
25388+
},
25389+
"powerTotal": {
25390+
"items": {
25391+
"type": "number"
25392+
},
25393+
"type": "array"
25394+
},
25395+
"powerUsed": {
25396+
"items": {
25397+
"type": "number"
2538125398
},
2538225399
"type": "array"
2538325400
},
@@ -26007,6 +26024,12 @@ const docTemplate = `{
2600726024
},
2600826025
"dto.NodeCurrent": {
2600926026
"properties": {
26027+
"cpuDetailedPercent": {
26028+
"items": {
26029+
"type": "number"
26030+
},
26031+
"type": "array"
26032+
},
2601026033
"cpuTotal": {
2601126034
"type": "integer"
2601226035
},
@@ -26247,6 +26270,9 @@ const docTemplate = `{
2624726270
},
2624826271
"platformFamily": {
2624926272
"type": "string"
26273+
},
26274+
"prettyDistro": {
26275+
"type": "string"
2625026276
}
2625126277
},
2625226278
"type": "object"

core/cmd/server/docs/swagger.json

Lines changed: 65 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@
845845
"200": {
846846
"description": "app icon",
847847
"schema": {
848-
"type": "string"
848+
"type": "file"
849849
}
850850
}
851851
},
@@ -23596,6 +23596,9 @@
2359623596
"cpuLogicalCores": {
2359723597
"type": "integer"
2359823598
},
23599+
"cpuMhz": {
23600+
"type": "number"
23601+
},
2359923602
"cpuModelName": {
2360023603
"type": "string"
2360123604
},
@@ -23632,6 +23635,9 @@
2363223635
"platformVersion": {
2363323636
"type": "string"
2363423637
},
23638+
"prettyDistro": {
23639+
"type": "string"
23640+
},
2363523641
"quickJump": {
2363623642
"items": {
2363723643
"$ref": "#/definitions/dto.QuickJump"
@@ -23652,6 +23658,12 @@
2365223658
},
2365323659
"dto.DashboardCurrent": {
2365423660
"properties": {
23661+
"cpuDetailedPercent": {
23662+
"items": {
23663+
"type": "number"
23664+
},
23665+
"type": "array"
23666+
},
2365523667
"cpuPercent": {
2365623668
"items": {
2365723669
"type": "number"
@@ -23921,6 +23933,9 @@
2392123933
"id": {
2392223934
"type": "integer"
2392323935
},
23936+
"initialDB": {
23937+
"type": "string"
23938+
},
2392423939
"name": {
2392523940
"maxLength": 256,
2392623941
"type": "string"
@@ -24050,6 +24065,9 @@
2405024065
"id": {
2405124066
"type": "integer"
2405224067
},
24068+
"initialDB": {
24069+
"type": "string"
24070+
},
2405324071
"password": {
2405424072
"type": "string"
2405524073
},
@@ -24570,40 +24588,6 @@
2457024588
},
2457124589
"type": "object"
2457224590
},
24573-
"dto.GPUMemoryUsageHelper": {
24574-
"properties": {
24575-
"gpuProcesses": {
24576-
"items": {
24577-
"$ref": "#/definitions/dto.GPUProcess"
24578-
},
24579-
"type": "array"
24580-
},
24581-
"percent": {
24582-
"type": "number"
24583-
},
24584-
"total": {
24585-
"type": "number"
24586-
},
24587-
"used": {
24588-
"type": "number"
24589-
}
24590-
},
24591-
"type": "object"
24592-
},
24593-
"dto.GPUPowerUsageHelper": {
24594-
"properties": {
24595-
"percent": {
24596-
"type": "number"
24597-
},
24598-
"total": {
24599-
"type": "number"
24600-
},
24601-
"used": {
24602-
"type": "number"
24603-
}
24604-
},
24605-
"type": "object"
24606-
},
2460724591
"dto.GPUProcess": {
2460824592
"properties": {
2460924593
"pid": {
@@ -25359,21 +25343,54 @@
2535925343
},
2536025344
"type": "array"
2536125345
},
25346+
"gpuProcesses": {
25347+
"items": {
25348+
"items": {
25349+
"$ref": "#/definitions/dto.GPUProcess"
25350+
},
25351+
"type": "array"
25352+
},
25353+
"type": "array"
25354+
},
2536225355
"gpuValue": {
2536325356
"items": {
2536425357
"type": "number"
2536525358
},
2536625359
"type": "array"
2536725360
},
25368-
"memoryValue": {
25361+
"memoryPercent": {
25362+
"items": {
25363+
"type": "number"
25364+
},
25365+
"type": "array"
25366+
},
25367+
"memoryTotal": {
25368+
"items": {
25369+
"type": "number"
25370+
},
25371+
"type": "array"
25372+
},
25373+
"memoryUsed": {
2536925374
"items": {
25370-
"$ref": "#/definitions/dto.GPUMemoryUsageHelper"
25375+
"type": "number"
2537125376
},
2537225377
"type": "array"
2537325378
},
25374-
"powerValue": {
25379+
"powerPercent": {
2537525380
"items": {
25376-
"$ref": "#/definitions/dto.GPUPowerUsageHelper"
25381+
"type": "number"
25382+
},
25383+
"type": "array"
25384+
},
25385+
"powerTotal": {
25386+
"items": {
25387+
"type": "number"
25388+
},
25389+
"type": "array"
25390+
},
25391+
"powerUsed": {
25392+
"items": {
25393+
"type": "number"
2537725394
},
2537825395
"type": "array"
2537925396
},
@@ -26003,6 +26020,12 @@
2600326020
},
2600426021
"dto.NodeCurrent": {
2600526022
"properties": {
26023+
"cpuDetailedPercent": {
26024+
"items": {
26025+
"type": "number"
26026+
},
26027+
"type": "array"
26028+
},
2600626029
"cpuTotal": {
2600726030
"type": "integer"
2600826031
},
@@ -26243,6 +26266,9 @@
2624326266
},
2624426267
"platformFamily": {
2624526268
"type": "string"
26269+
},
26270+
"prettyDistro": {
26271+
"type": "string"
2624626272
}
2624726273
},
2624826274
"type": "object"

0 commit comments

Comments
 (0)