ref: Adjust Swagger format

This commit is contained in:
lan-yonghui 2025-12-08 17:29:20 +08:00
parent 05addd4cde
commit 44b92a509d
3 changed files with 131 additions and 79 deletions

View file

@ -200,7 +200,7 @@ func (b *BaseApi) GetAppListUpdate(c *gin.Context) {
// @Summary Get app icon by app_id // @Summary Get app icon by app_id
// @Accept json // @Accept json
// @Param appId path integer true "app id" // @Param appId path integer true "app id"
// @Success 200 {string} file "app icon" // @Success 200 {file} file "app icon"
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @Security Timestamp // @Security Timestamp
// @Router /apps/icon/:appId [get] // @Router /apps/icon/:appId [get]

View file

@ -849,7 +849,7 @@ const docTemplate = `{
"200": { "200": {
"description": "app icon", "description": "app icon",
"schema": { "schema": {
"type": "string" "type": "file"
} }
} }
}, },
@ -23600,6 +23600,9 @@ const docTemplate = `{
"cpuLogicalCores": { "cpuLogicalCores": {
"type": "integer" "type": "integer"
}, },
"cpuMhz": {
"type": "number"
},
"cpuModelName": { "cpuModelName": {
"type": "string" "type": "string"
}, },
@ -23636,6 +23639,9 @@ const docTemplate = `{
"platformVersion": { "platformVersion": {
"type": "string" "type": "string"
}, },
"prettyDistro": {
"type": "string"
},
"quickJump": { "quickJump": {
"items": { "items": {
"$ref": "#/definitions/dto.QuickJump" "$ref": "#/definitions/dto.QuickJump"
@ -23656,6 +23662,12 @@ const docTemplate = `{
}, },
"dto.DashboardCurrent": { "dto.DashboardCurrent": {
"properties": { "properties": {
"cpuDetailedPercent": {
"items": {
"type": "number"
},
"type": "array"
},
"cpuPercent": { "cpuPercent": {
"items": { "items": {
"type": "number" "type": "number"
@ -23925,6 +23937,9 @@ const docTemplate = `{
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"initialDB": {
"type": "string"
},
"name": { "name": {
"maxLength": 256, "maxLength": 256,
"type": "string" "type": "string"
@ -24054,6 +24069,9 @@ const docTemplate = `{
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"initialDB": {
"type": "string"
},
"password": { "password": {
"type": "string" "type": "string"
}, },
@ -24574,40 +24592,6 @@ const docTemplate = `{
}, },
"type": "object" "type": "object"
}, },
"dto.GPUMemoryUsageHelper": {
"properties": {
"gpuProcesses": {
"items": {
"$ref": "#/definitions/dto.GPUProcess"
},
"type": "array"
},
"percent": {
"type": "number"
},
"total": {
"type": "number"
},
"used": {
"type": "number"
}
},
"type": "object"
},
"dto.GPUPowerUsageHelper": {
"properties": {
"percent": {
"type": "number"
},
"total": {
"type": "number"
},
"used": {
"type": "number"
}
},
"type": "object"
},
"dto.GPUProcess": { "dto.GPUProcess": {
"properties": { "properties": {
"pid": { "pid": {
@ -25363,21 +25347,54 @@ const docTemplate = `{
}, },
"type": "array" "type": "array"
}, },
"gpuProcesses": {
"items": {
"items": {
"$ref": "#/definitions/dto.GPUProcess"
},
"type": "array"
},
"type": "array"
},
"gpuValue": { "gpuValue": {
"items": { "items": {
"type": "number" "type": "number"
}, },
"type": "array" "type": "array"
}, },
"memoryValue": { "memoryPercent": {
"items": { "items": {
"$ref": "#/definitions/dto.GPUMemoryUsageHelper" "type": "number"
}, },
"type": "array" "type": "array"
}, },
"powerValue": { "memoryTotal": {
"items": { "items": {
"$ref": "#/definitions/dto.GPUPowerUsageHelper" "type": "number"
},
"type": "array"
},
"memoryUsed": {
"items": {
"type": "number"
},
"type": "array"
},
"powerPercent": {
"items": {
"type": "number"
},
"type": "array"
},
"powerTotal": {
"items": {
"type": "number"
},
"type": "array"
},
"powerUsed": {
"items": {
"type": "number"
}, },
"type": "array" "type": "array"
}, },
@ -26007,6 +26024,12 @@ const docTemplate = `{
}, },
"dto.NodeCurrent": { "dto.NodeCurrent": {
"properties": { "properties": {
"cpuDetailedPercent": {
"items": {
"type": "number"
},
"type": "array"
},
"cpuTotal": { "cpuTotal": {
"type": "integer" "type": "integer"
}, },
@ -26247,6 +26270,9 @@ const docTemplate = `{
}, },
"platformFamily": { "platformFamily": {
"type": "string" "type": "string"
},
"prettyDistro": {
"type": "string"
} }
}, },
"type": "object" "type": "object"

View file

@ -845,7 +845,7 @@
"200": { "200": {
"description": "app icon", "description": "app icon",
"schema": { "schema": {
"type": "string" "type": "file"
} }
} }
}, },
@ -23596,6 +23596,9 @@
"cpuLogicalCores": { "cpuLogicalCores": {
"type": "integer" "type": "integer"
}, },
"cpuMhz": {
"type": "number"
},
"cpuModelName": { "cpuModelName": {
"type": "string" "type": "string"
}, },
@ -23632,6 +23635,9 @@
"platformVersion": { "platformVersion": {
"type": "string" "type": "string"
}, },
"prettyDistro": {
"type": "string"
},
"quickJump": { "quickJump": {
"items": { "items": {
"$ref": "#/definitions/dto.QuickJump" "$ref": "#/definitions/dto.QuickJump"
@ -23652,6 +23658,12 @@
}, },
"dto.DashboardCurrent": { "dto.DashboardCurrent": {
"properties": { "properties": {
"cpuDetailedPercent": {
"items": {
"type": "number"
},
"type": "array"
},
"cpuPercent": { "cpuPercent": {
"items": { "items": {
"type": "number" "type": "number"
@ -23921,6 +23933,9 @@
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"initialDB": {
"type": "string"
},
"name": { "name": {
"maxLength": 256, "maxLength": 256,
"type": "string" "type": "string"
@ -24050,6 +24065,9 @@
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"initialDB": {
"type": "string"
},
"password": { "password": {
"type": "string" "type": "string"
}, },
@ -24570,40 +24588,6 @@
}, },
"type": "object" "type": "object"
}, },
"dto.GPUMemoryUsageHelper": {
"properties": {
"gpuProcesses": {
"items": {
"$ref": "#/definitions/dto.GPUProcess"
},
"type": "array"
},
"percent": {
"type": "number"
},
"total": {
"type": "number"
},
"used": {
"type": "number"
}
},
"type": "object"
},
"dto.GPUPowerUsageHelper": {
"properties": {
"percent": {
"type": "number"
},
"total": {
"type": "number"
},
"used": {
"type": "number"
}
},
"type": "object"
},
"dto.GPUProcess": { "dto.GPUProcess": {
"properties": { "properties": {
"pid": { "pid": {
@ -25359,21 +25343,54 @@
}, },
"type": "array" "type": "array"
}, },
"gpuProcesses": {
"items": {
"items": {
"$ref": "#/definitions/dto.GPUProcess"
},
"type": "array"
},
"type": "array"
},
"gpuValue": { "gpuValue": {
"items": { "items": {
"type": "number" "type": "number"
}, },
"type": "array" "type": "array"
}, },
"memoryValue": { "memoryPercent": {
"items": { "items": {
"$ref": "#/definitions/dto.GPUMemoryUsageHelper" "type": "number"
}, },
"type": "array" "type": "array"
}, },
"powerValue": { "memoryTotal": {
"items": { "items": {
"$ref": "#/definitions/dto.GPUPowerUsageHelper" "type": "number"
},
"type": "array"
},
"memoryUsed": {
"items": {
"type": "number"
},
"type": "array"
},
"powerPercent": {
"items": {
"type": "number"
},
"type": "array"
},
"powerTotal": {
"items": {
"type": "number"
},
"type": "array"
},
"powerUsed": {
"items": {
"type": "number"
}, },
"type": "array" "type": "array"
}, },
@ -26003,6 +26020,12 @@
}, },
"dto.NodeCurrent": { "dto.NodeCurrent": {
"properties": { "properties": {
"cpuDetailedPercent": {
"items": {
"type": "number"
},
"type": "array"
},
"cpuTotal": { "cpuTotal": {
"type": "integer" "type": "integer"
}, },
@ -26243,6 +26266,9 @@
}, },
"platformFamily": { "platformFamily": {
"type": "string" "type": "string"
},
"prettyDistro": {
"type": "string"
} }
}, },
"type": "object" "type": "object"