From c2ae95c4cc04c8992b002a4f64d7bd51b4142ada Mon Sep 17 00:00:00 2001 From: lejianwen <84855512@qq.com> Date: Fri, 6 Dec 2024 10:36:40 +0800 Subject: [PATCH] up api docs --- docs/admin/admin_docs.go | 28 +++++++++++++++++++++------- docs/admin/admin_swagger.json | 28 +++++++++++++++++++++------- docs/admin/admin_swagger.yaml | 23 ++++++++++++++++------- docs/api/api_docs.go | 4 ++-- docs/api/api_swagger.json | 4 ++-- docs/api/api_swagger.yaml | 4 ++-- http/controller/api/webClient.go | 2 +- 7 files changed, 65 insertions(+), 28 deletions(-) diff --git a/docs/admin/admin_docs.go b/docs/admin/admin_docs.go index 9ce3ba7..7998b8a 100644 --- a/docs/admin/admin_docs.go +++ b/docs/admin/admin_docs.go @@ -3569,7 +3569,7 @@ const docTemplateadmin = `{ "token": [] } ], - "description": "登录凭证删除", + "description": "登录凭证批量删除", "consumes": [ "application/json" ], @@ -3579,7 +3579,7 @@ const docTemplateadmin = `{ "tags": [ "登录凭证" ], - "summary": "登录凭证删除", + "summary": "登录凭证批量删除", "parameters": [ { "description": "登录凭证信息", @@ -3587,7 +3587,7 @@ const docTemplateadmin = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/model.UserToken" + "$ref": "#/definitions/admin.UserTokenBatchDeleteForm" } } ], @@ -3798,12 +3798,12 @@ const docTemplateadmin = `{ "properties": { "new_password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 }, "old_password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 } } @@ -4038,7 +4038,7 @@ const docTemplateadmin = `{ }, "username": { "type": "string", - "maxLength": 10, + "maxLength": 32, "minLength": 2 } } @@ -4066,11 +4066,25 @@ const docTemplateadmin = `{ }, "password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 } } }, + "admin.UserTokenBatchDeleteForm": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "model.AddressBook": { "type": "object", "properties": { diff --git a/docs/admin/admin_swagger.json b/docs/admin/admin_swagger.json index b4b8d8c..b8fa451 100644 --- a/docs/admin/admin_swagger.json +++ b/docs/admin/admin_swagger.json @@ -3562,7 +3562,7 @@ "token": [] } ], - "description": "登录凭证删除", + "description": "登录凭证批量删除", "consumes": [ "application/json" ], @@ -3572,7 +3572,7 @@ "tags": [ "登录凭证" ], - "summary": "登录凭证删除", + "summary": "登录凭证批量删除", "parameters": [ { "description": "登录凭证信息", @@ -3580,7 +3580,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/model.UserToken" + "$ref": "#/definitions/admin.UserTokenBatchDeleteForm" } } ], @@ -3791,12 +3791,12 @@ "properties": { "new_password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 }, "old_password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 } } @@ -4031,7 +4031,7 @@ }, "username": { "type": "string", - "maxLength": 10, + "maxLength": 32, "minLength": 2 } } @@ -4059,11 +4059,25 @@ }, "password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 } } }, + "admin.UserTokenBatchDeleteForm": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, "model.AddressBook": { "type": "object", "properties": { diff --git a/docs/admin/admin_swagger.yaml b/docs/admin/admin_swagger.yaml index 1480df4..627ac01 100644 --- a/docs/admin/admin_swagger.yaml +++ b/docs/admin/admin_swagger.yaml @@ -78,11 +78,11 @@ definitions: admin.ChangeCurPasswordForm: properties: new_password: - maxLength: 20 + maxLength: 32 minLength: 4 type: string old_password: - maxLength: 20 + maxLength: 32 minLength: 4 type: string required: @@ -238,7 +238,7 @@ definitions: - $ref: '#/definitions/model.StatusCode' minimum: 0 username: - maxLength: 10 + maxLength: 32 minLength: 2 type: string required: @@ -258,13 +258,22 @@ definitions: id: type: integer password: - maxLength: 20 + maxLength: 32 minLength: 4 type: string required: - id - password type: object + admin.UserTokenBatchDeleteForm: + properties: + ids: + items: + type: integer + type: array + required: + - ids + type: object model.AddressBook: properties: alias: @@ -2871,14 +2880,14 @@ paths: post: consumes: - application/json - description: 登录凭证删除 + description: 登录凭证批量删除 parameters: - description: 登录凭证信息 in: body name: body required: true schema: - $ref: '#/definitions/model.UserToken' + $ref: '#/definitions/admin.UserTokenBatchDeleteForm' produces: - application/json responses: @@ -2892,7 +2901,7 @@ paths: $ref: '#/definitions/response.Response' security: - token: [] - summary: 登录凭证删除 + summary: 登录凭证批量删除 tags: - 登录凭证 /admin/user_token/list: diff --git a/docs/api/api_docs.go b/docs/api/api_docs.go index de4dc85..69f2fc6 100644 --- a/docs/api/api_docs.go +++ b/docs/api/api_docs.go @@ -1356,7 +1356,7 @@ const docTemplateapi = `{ }, "password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 }, "type": { @@ -1364,7 +1364,7 @@ const docTemplateapi = `{ }, "username": { "type": "string", - "maxLength": 10, + "maxLength": 32, "minLength": 2 }, "uuid": { diff --git a/docs/api/api_swagger.json b/docs/api/api_swagger.json index 03e3f69..13b8153 100644 --- a/docs/api/api_swagger.json +++ b/docs/api/api_swagger.json @@ -1349,7 +1349,7 @@ }, "password": { "type": "string", - "maxLength": 20, + "maxLength": 32, "minLength": 4 }, "type": { @@ -1357,7 +1357,7 @@ }, "username": { "type": "string", - "maxLength": 10, + "maxLength": 32, "minLength": 2 }, "uuid": { diff --git a/docs/api/api_swagger.yaml b/docs/api/api_swagger.yaml index fc0e516..1c9cebe 100644 --- a/docs/api/api_swagger.yaml +++ b/docs/api/api_swagger.yaml @@ -62,13 +62,13 @@ definitions: id: type: string password: - maxLength: 20 + maxLength: 32 minLength: 4 type: string type: type: string username: - maxLength: 10 + maxLength: 32 minLength: 2 type: string uuid: diff --git a/http/controller/api/webClient.go b/http/controller/api/webClient.go index 1c029e3..5a3fdd6 100644 --- a/http/controller/api/webClient.go +++ b/http/controller/api/webClient.go @@ -94,7 +94,7 @@ func (i *WebClient) SharedPeer(c *gin.Context) { // @Produce json // @Success 200 {object} response.Response // @Failure 500 {object} response.Response -// @Router /server-config [get] +// @Router /server-config-v2 [get] // @Security token func (i *WebClient) ServerConfigV2(c *gin.Context) { response.Success(