Skip to content

Commit 05addd4

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

File tree

14 files changed

+1282
-399
lines changed

14 files changed

+1282
-399
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 {file} file "app icon"
203+
// @Success 200 {string} file "app icon"
204204
// @Security ApiKeyAuth
205205
// @Security Timestamp
206206
// @Router /apps/icon/:appId [get]

agent/app/api/v2/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ func (b *BaseApi) Inspect(c *gin.Context) {
502502
helper.SuccessWithData(c, result)
503503
}
504504

505-
// @Router /containers/download/log [post]
506505
func (b *BaseApi) DownloadContainerLogs(c *gin.Context) {
507506
var req dto.ContainerLog
508507
if err := helper.CheckBindAndValidate(&req, c); err != nil {
@@ -716,6 +715,7 @@ func (b *BaseApi) ComposeUpdate(c *gin.Context) {
716715
// @Param since query string false "时间筛选"
717716
// @Param follow query string false "是否追踪"
718717
// @Param tail query string false "显示行号"
718+
// @Success 200
719719
// @Security ApiKeyAuth
720720
// @Security Timestamp
721721
// @Router /containers/search/log [get]

agent/app/api/v2/dashboard.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (b *BaseApi) LoadDashboardOsInfo(c *gin.Context) {
2727
// @Tags Dashboard
2828
// @Summary Load app launcher
2929
// @Accept json
30-
// @Success 200 {Array} dto.AppLauncher
30+
// @Success 200 {array} dto.AppLauncher
3131
// @Security ApiKeyAuth
3232
// @Security Timestamp
3333
// @Router /dashboard/app/launcher [get]
@@ -44,7 +44,7 @@ func (b *BaseApi) LoadAppLauncher(c *gin.Context) {
4444
// @Summary Load app launcher options
4545
// @Accept json
4646
// @Param request body dto.SearchByFilter true "request"
47-
// @Success 200 {Array} dto.LauncherOption
47+
// @Success 200 {array} dto.LauncherOption
4848
// @Security ApiKeyAuth
4949
// @Security Timestamp
5050
// @Router /dashboard/app/launcher/option [post]
@@ -85,7 +85,7 @@ func (b *BaseApi) UpdateAppLauncher(c *gin.Context) {
8585

8686
// @Tags Dashboard
8787
// @Summary Load quick jump options
88-
// @Success 200 {Array} dto.QuickJump
88+
// @Success 200 {array} dto.QuickJump
8989
// @Security ApiKeyAuth
9090
// @Security Timestamp
9191
// @Router /dashboard/quick/option [get]
@@ -181,7 +181,7 @@ func (b *BaseApi) LoadDashboardCurrentInfo(c *gin.Context) {
181181

182182
// @Tags Dashboard
183183
// @Summary Load top cpu processes
184-
// @Success 200 {Array} dto.Process
184+
// @Success 200 {array} dto.Process
185185
// @Security ApiKeyAuth
186186
// @Security Timestamp
187187
// @Router /dashboard/current/top/cpu [get]
@@ -192,7 +192,7 @@ func (b *BaseApi) LoadDashboardTopCPU(c *gin.Context) {
192192

193193
// @Tags Dashboard
194194
// @Summary Load top memory processes
195-
// @Success 200 {Array} dto.Process
195+
// @Success 200 {array} dto.Process
196196
// @Security ApiKeyAuth
197197
// @Security Timestamp
198198
// @Router /dashboard/current/top/mem [get]

agent/app/api/v2/database_mysql.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ func (b *BaseApi) ListDBFormatCollationOptions(c *gin.Context) {
214214
// @Summary Load mysql database from remote
215215
// @Accept json
216216
// @Param request body dto.MysqlLoadDB true "request"
217+
// @Success 200
217218
// @Security ApiKeyAuth
218219
// @Security Timestamp
219220
// @Router /databases/load [post]

agent/app/api/v2/database_postgresql.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ func (b *BaseApi) SearchPostgresql(c *gin.Context) {
167167
// @Summary Load postgresql database from remote
168168
// @Accept json
169169
// @Param request body dto.PostgresqlLoadDB true "request"
170+
// @Success 200
170171
// @Security ApiKeyAuth
171172
// @Security Timestamp
172173
// @Router /databases/pg/:database/load [post]

agent/app/api/v2/device.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (b *BaseApi) LoadDeviceBaseInfo(c *gin.Context) {
2727
// @Tags Device
2828
// @Summary list time zone options
2929
// @Accept json
30-
// @Success 200 {Array} string
30+
// @Success 200 {array} string
3131
// @Security ApiKeyAuth
3232
// @Security Timestamp
3333
// @Router /toolbox/device/zone/options [get]

agent/app/api/v2/fail2ban.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (b *BaseApi) LoadFail2BanBaseInfo(c *gin.Context) {
2828
// @Summary Page fail2ban ip list
2929
// @Accept json
3030
// @Param request body dto.Fail2BanSearch true "request"
31-
// @Success 200 {Array} string
31+
// @Success 200 {array} string
3232
// @Security ApiKeyAuth
3333
// @Security Timestamp
3434
// @Router /toolbox/fail2ban/search [post]
@@ -51,6 +51,7 @@ func (b *BaseApi) SearchFail2Ban(c *gin.Context) {
5151
// @Summary Operate fail2ban
5252
// @Accept json
5353
// @Param request body dto.Operate true "request"
54+
// @Success 200
5455
// @Security ApiKeyAuth
5556
// @Security Timestamp
5657
// @Router /toolbox/fail2ban/operate [post]
@@ -72,7 +73,8 @@ func (b *BaseApi) OperateFail2Ban(c *gin.Context) {
7273
// @Tags Fail2ban
7374
// @Summary Operate sshd of fail2ban
7475
// @Accept json
75-
// @Param request body dto.Operate true "request"
76+
// @Param request body dto.Fail2BanSet true "request"
77+
// @Success 200
7678
// @Security ApiKeyAuth
7779
// @Security Timestamp
7880
// @Router /toolbox/fail2ban/operate/sshd [post]

agent/app/api/v2/ftp.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func (b *BaseApi) LoadFtpLogInfo(c *gin.Context) {
5454
// @Summary Operate FTP
5555
// @Accept json
5656
// @Param request body dto.Operate true "request"
57+
// @Success 200
5758
// @Security ApiKeyAuth
5859
// @Security Timestamp
5960
// @Router /toolbox/ftp/operate [post]

agent/app/api/v2/monitor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (b *BaseApi) LoadMonitor(c *gin.Context) {
3434
// @Tags Monitor
3535
// @Summary Load monitor data
3636
// @Param request body dto.MonitorGPUSearch true "request"
37-
// @Success 200 {object} dto.dto.MonitorGPUData
37+
// @Success 200 {object} dto.MonitorGPUData
3838
// @Security ApiKeyAuth
3939
// @Security Timestamp
4040
// @Router /hosts/monitor/gpu/search [post]

agent/app/api/v2/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (b *BaseApi) CheckLocalConn(c *gin.Context) {
8686

8787
// @Tags System Setting
8888
// @Summary Check local conn info
89-
// @Success 200 {bool} isOk
89+
// @Success 200 {boolean} isOk
9090
// @Security ApiKeyAuth
9191
// @Security Timestamp
9292
// @Router /settings/ssh/check/info [post]

0 commit comments

Comments
 (0)