From ca9d697a6a1cbfb446e7c05dc4ad5401a4507cfa Mon Sep 17 00:00:00 2001 From: wzj Date: Thu, 21 Nov 2024 21:57:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 20 ++++++++++++++++---- docs/swagger.json | 20 ++++++++++++++++---- docs/swagger.yaml | 16 ++++++++++++---- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index a492ec2..f4a28de 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -677,9 +677,15 @@ const docTemplate = `{ "id": { "type": "integer" }, - "img": { + "imgString": { "type": "string" }, + "imgs": { + "type": "array", + "items": { + "type": "string" + } + }, "itemname": { "type": "string" }, @@ -738,9 +744,15 @@ const docTemplate = `{ "example": "这是一个女大自用的iPhone18" }, "img": { - "description": "@description 图片ID,请用 /file/upload/item-img 接口上传图片后获取的图片唯一标识", - "type": "string", - "example": "123456789012" + "description": "@description 图片ID,请用 /file/upload/item-img 接口上传图片后获取的图片唯一标识,多张图片请数组上传", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "123456789012", + "abcdefghijkl" + ] }, "itemname": { "type": "string", diff --git a/docs/swagger.json b/docs/swagger.json index 1e4c12a..9bec146 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -671,9 +671,15 @@ "id": { "type": "integer" }, - "img": { + "imgString": { "type": "string" }, + "imgs": { + "type": "array", + "items": { + "type": "string" + } + }, "itemname": { "type": "string" }, @@ -732,9 +738,15 @@ "example": "这是一个女大自用的iPhone18" }, "img": { - "description": "@description 图片ID,请用 /file/upload/item-img 接口上传图片后获取的图片唯一标识", - "type": "string", - "example": "123456789012" + "description": "@description 图片ID,请用 /file/upload/item-img 接口上传图片后获取的图片唯一标识,多张图片请数组上传", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "123456789012", + "abcdefghijkl" + ] }, "itemname": { "type": "string", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 2cb8213..dff7760 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -8,8 +8,12 @@ definitions: type: string id: type: integer - img: + imgString: type: string + imgs: + items: + type: string + type: array itemname: type: string price: @@ -44,9 +48,13 @@ definitions: example: 这是一个女大自用的iPhone18 type: string img: - description: '@description 图片ID,请用 /file/upload/item-img 接口上传图片后获取的图片唯一标识' - example: "123456789012" - type: string + description: '@description 图片ID,请用 /file/upload/item-img 接口上传图片后获取的图片唯一标识,多张图片请数组上传' + example: + - "123456789012" + - abcdefghijkl + items: + type: string + type: array itemname: example: 女大自用iPhone18 maxLength: 12