From 6ce6d4e45c2ceb0e54de0f818922054e98bfb5cb Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 13 Dec 2024 17:55:43 +0800 Subject: [PATCH] update swag --- app/hdl/comm/hdl_comm.go | 2 +- docs/docs.go | 49 +++++++++++++++++++++++++++++++++++++++- docs/swagger.json | 49 +++++++++++++++++++++++++++++++++++++++- docs/swagger.yaml | 33 ++++++++++++++++++++++++++- 4 files changed, 129 insertions(+), 4 deletions(-) diff --git a/app/hdl/comm/hdl_comm.go b/app/hdl/comm/hdl_comm.go index ce194fd..b5346b3 100644 --- a/app/hdl/comm/hdl_comm.go +++ b/app/hdl/comm/hdl_comm.go @@ -97,7 +97,7 @@ func GetOssUrl(c *gin.Context) { // @Success 200 {string} "success" // @Success 200 {string} "data exist" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/v1/comm/getOssUrl [POST] +// @Router /api/v1/comm/accessRecords [POST] func AccessRecords(c *gin.Context) { var req *comm.AccessRecordsReq if err1 := c.ShouldBindJSON(&req); err1 != nil { diff --git a/docs/docs.go b/docs/docs.go index 32485fd..aa15933 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1399,7 +1399,7 @@ const docTemplate = `{ } } }, - "/api/v1/comm/getOssUrl": { + "/api/v1/comm/accessRecords": { "post": { "description": "页面记录", "consumes": [ @@ -1446,6 +1446,53 @@ const docTemplate = `{ } } }, + "/api/v1/comm/getOssUrl": { + "post": { + "description": "上传许可链接(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "对象存储" + ], + "summary": "通用请求-对象存储-上传许可链接(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "签名上传url", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/comm.ImgReqUploadReq" + } + } + ], + "responses": { + "200": { + "description": "许可链接", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/v1/config": { "get": { "description": "基本配置", diff --git a/docs/swagger.json b/docs/swagger.json index a897865..3a78297 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1393,7 +1393,7 @@ } } }, - "/api/v1/comm/getOssUrl": { + "/api/v1/comm/accessRecords": { "post": { "description": "页面记录", "consumes": [ @@ -1440,6 +1440,53 @@ } } }, + "/api/v1/comm/getOssUrl": { + "post": { + "description": "上传许可链接(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "对象存储" + ], + "summary": "通用请求-对象存储-上传许可链接(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "签名上传url", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/comm.ImgReqUploadReq" + } + } + ], + "responses": { + "200": { + "description": "许可链接", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/v1/config": { "get": { "description": "基本配置", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 0870a4a..3281096 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -2631,7 +2631,7 @@ paths: summary: 蛋蛋学院-文章-分享后调用统计数量 tags: - 蛋蛋学院 - /api/v1/comm/getOssUrl: + /api/v1/comm/accessRecords: post: consumes: - application/json @@ -2662,6 +2662,37 @@ paths: summary: 通用请求-访问记录-页面记录 tags: - 访问记录 + /api/v1/comm/getOssUrl: + post: + consumes: + - application/json + description: 上传许可链接(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 签名上传url + in: body + name: req + required: true + schema: + $ref: '#/definitions/comm.ImgReqUploadReq' + produces: + - application/json + responses: + "200": + description: 许可链接 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 通用请求-对象存储-上传许可链接(获取) + tags: + - 对象存储 /api/v1/config: get: consumes: