From 24098e397fd8e18700b9fe066876e62294d57e74 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:36:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=96=E6=B6=88=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E7=9A=84=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=20(#2878?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/v1/file.go | 1 - cmd/server/docs/docs.go | 23 +++++++++-------------- cmd/server/docs/swagger.json | 19 +++++++------------ cmd/server/docs/swagger.yaml | 14 +++++--------- 4 files changed, 21 insertions(+), 36 deletions(-) diff --git a/backend/app/api/v1/file.go b/backend/app/api/v1/file.go index bae992ca1..339a48854 100644 --- a/backend/app/api/v1/file.go +++ b/backend/app/api/v1/file.go @@ -340,7 +340,6 @@ func (b *BaseApi) UploadFiles(c *gin.Context) { // @Success 200 // @Security ApiKeyAuth // @Router /files/check [post] -// @x-panel-log {"bodyKeys":["path"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"检测文件 [path] 是否存在","formatEN":"Check whether file [path] exists"} func (b *BaseApi) CheckFile(c *gin.Context) { var req request.FilePathCheck if err := helper.CheckBindAndValidate(&req, c); err != nil { diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 669684aad..095802c53 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -1,5 +1,5 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package docs GENERATED BY SWAG; DO NOT EDIT +// This file was generated by swaggo/swag package docs import "github.com/swaggo/swag" @@ -5160,15 +5160,6 @@ const docTemplate = `{ "200": { "description": "OK" } - }, - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "path" - ], - "formatEN": "Check whether file [path] exists", - "formatZH": "检测文件 [path] 是否存在", - "paramKeys": [] } } }, @@ -17373,11 +17364,17 @@ const docTemplate = `{ "request.NginxConfigUpdate": { "type": "object", "required": [ + "operate", "websiteId" ], "properties": { "operate": { - "type": "string" + "type": "string", + "enum": [ + "add", + "update", + "delete" + ] }, "params": {}, "scope": { @@ -18195,8 +18192,6 @@ const docTemplate = `{ "request.WebsiteProxyConfig": { "type": "object", "required": [ - "cacheTime", - "cacheUnit", "id", "match", "modifier", diff --git a/cmd/server/docs/swagger.json b/cmd/server/docs/swagger.json index 52d0d4a4e..bb4421d08 100644 --- a/cmd/server/docs/swagger.json +++ b/cmd/server/docs/swagger.json @@ -5153,15 +5153,6 @@ "200": { "description": "OK" } - }, - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "path" - ], - "formatEN": "Check whether file [path] exists", - "formatZH": "检测文件 [path] 是否存在", - "paramKeys": [] } } }, @@ -17366,11 +17357,17 @@ "request.NginxConfigUpdate": { "type": "object", "required": [ + "operate", "websiteId" ], "properties": { "operate": { - "type": "string" + "type": "string", + "enum": [ + "add", + "update", + "delete" + ] }, "params": {}, "scope": { @@ -18188,8 +18185,6 @@ "request.WebsiteProxyConfig": { "type": "object", "required": [ - "cacheTime", - "cacheUnit", "id", "match", "modifier", diff --git a/cmd/server/docs/swagger.yaml b/cmd/server/docs/swagger.yaml index c93e7dfaa..d81aa442a 100644 --- a/cmd/server/docs/swagger.yaml +++ b/cmd/server/docs/swagger.yaml @@ -3229,6 +3229,10 @@ definitions: request.NginxConfigUpdate: properties: operate: + enum: + - add + - update + - delete type: string params: {} scope: @@ -3236,6 +3240,7 @@ definitions: websiteId: type: integer required: + - operate - websiteId type: object request.NginxProxyUpdate: @@ -3810,8 +3815,6 @@ definitions: type: string type: object required: - - cacheTime - - cacheUnit - id - match - modifier @@ -7659,13 +7662,6 @@ paths: summary: Check file exist tags: - File - x-panel-log: - BeforeFunctions: [] - bodyKeys: - - path - formatEN: Check whether file [path] exists - formatZH: 检测文件 [path] 是否存在 - paramKeys: [] /files/chunkdownload: post: consumes: