From 51a9ac25fba6fd585ae767d0387f95d268aa4e18 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 27 Nov 2024 09:28:57 +0800 Subject: [PATCH] update swag --- app/hdl/advertising/hdl_function.go | 2 +- app/hdl/advertising/hdl_list.go | 2 +- app/md/setCenter/oss/aliyun/md.basic.go | 4 +- docs/docs.go | 93 +++++++++++++++++++++++-- docs/swagger.json | 93 +++++++++++++++++++++++-- docs/swagger.yaml | 63 +++++++++++++++-- 6 files changed, 237 insertions(+), 20 deletions(-) diff --git a/app/hdl/advertising/hdl_function.go b/app/hdl/advertising/hdl_function.go index e50b944..9a2ccb0 100644 --- a/app/hdl/advertising/hdl_function.go +++ b/app/hdl/advertising/hdl_function.go @@ -13,7 +13,7 @@ import ( // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Param req body md.AdvertisingFunctionListReq true "(分页信息必填)" -// @Success 200 {object} md.AdvertisingFunctionResp "具体数据" +// @Success 200 {object} md.AdvertisingFunctionListResp "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/advertising/function/list [post] func FunctionList(c *gin.Context) { diff --git a/app/hdl/advertising/hdl_list.go b/app/hdl/advertising/hdl_list.go index 481c2e2..505725b 100644 --- a/app/hdl/advertising/hdl_list.go +++ b/app/hdl/advertising/hdl_list.go @@ -13,7 +13,7 @@ import ( // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Param req body md.AdvertisingListReq true "(分页信息必填)" -// @Success 200 {object} md.AdvertisingResp "具体数据" +// @Success 200 {object} md.AdvertisingListResp "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/advertising/list [post] func List(c *gin.Context) { diff --git a/app/md/setCenter/oss/aliyun/md.basic.go b/app/md/setCenter/oss/aliyun/md.basic.go index f0034e1..e18b4e7 100644 --- a/app/md/setCenter/oss/aliyun/md.basic.go +++ b/app/md/setCenter/oss/aliyun/md.basic.go @@ -7,7 +7,7 @@ type GetBasicResp struct { OssAccessKeyId string `json:"oss_access_key_id" example:"oss访问秘钥id"` OssAccessKeySecret string `json:"oss_access_key_secret" example:"oss访问秘钥"` OssObjectDomain string `json:"oss_object_domain" example:"oss域名"` - OssOption string `json:"oss_option" example:"oss选项,以逗号分割"` + OssOption string `json:"oss_option" example:"oss上传文件类型选项,以逗号分割"` } type SetBasicReq struct { @@ -17,5 +17,5 @@ type SetBasicReq struct { OssAccessKeyId string `json:"oss_access_key_id" example:"oss访问秘钥id"` OssAccessKeySecret string `json:"oss_access_key_secret" example:"oss访问秘钥"` OssObjectDomain string `json:"oss_object_domain" example:"oss域名"` - OssOption string `json:"oss_option" example:"oss选项,以逗号分割"` + OssOption string `json:"oss_option" example:"oss上传文件类型选项,以逗号分割"` } diff --git a/docs/docs.go b/docs/docs.go index 414971d..8da3e9d 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -153,7 +153,7 @@ const docTemplate = `{ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.AdvertisingFunctionResp" + "$ref": "#/definitions/md.AdvertisingFunctionListResp" } }, "400": { @@ -323,7 +323,7 @@ const docTemplate = `{ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.AdvertisingResp" + "$ref": "#/definitions/md.AdvertisingListResp" } }, "400": { @@ -6000,6 +6000,10 @@ const docTemplate = `{ "oss_object_domain": { "type": "string", "example": "oss域名" + }, + "oss_option": { + "type": "string", + "example": "oss上传文件类型选项,以逗号分割" } } }, @@ -6029,6 +6033,10 @@ const docTemplate = `{ "oss_object_domain": { "type": "string", "example": "oss域名" + }, + "oss_option": { + "type": "string", + "example": "oss上传文件类型选项,以逗号分割" } } }, @@ -6339,8 +6347,37 @@ const docTemplate = `{ } } }, - "md.AdvertisingFunctionResp": { - "type": "object" + "md.AdvertisingFunctionListResp": { + "type": "object", + "properties": { + "adv_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AdvertisingFunctionList" + } + }, + "select_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "total": { + "type": "integer" + } + } }, "md.AdvertisingLimit": { "type": "object", @@ -6383,6 +6420,30 @@ const docTemplate = `{ } } }, + "md.AdvertisingList": { + "type": "object", + "properties": { + "counting_down": { + "type": "string", + "example": "倒计时 单位秒" + }, + "id": { + "type": "string" + }, + "info": { + "type": "string", + "example": "广告位配置 {\"chuanshanjia\":{\"android_ad_id\":[\"\"],\"ios_ad_id\":[\"\"]}}" + }, + "kind": { + "type": "string", + "example": "广告类型(1:开屏广告 2:插屏广告 3:激励视频 4:信息流广告 5:全屏视频)" + }, + "name": { + "type": "string", + "example": "名称" + } + } + }, "md.AdvertisingListReq": { "type": "object", "properties": { @@ -6400,8 +6461,28 @@ const docTemplate = `{ } } }, - "md.AdvertisingResp": { - "type": "object" + "md.AdvertisingListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AdvertisingList" + } + }, + "select_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "total": { + "type": "integer" + } + } }, "md.AdvertisingSaveReq": { "type": "object", diff --git a/docs/swagger.json b/docs/swagger.json index e13655a..6dc0a2e 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -146,7 +146,7 @@ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.AdvertisingFunctionResp" + "$ref": "#/definitions/md.AdvertisingFunctionListResp" } }, "400": { @@ -316,7 +316,7 @@ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.AdvertisingResp" + "$ref": "#/definitions/md.AdvertisingListResp" } }, "400": { @@ -5993,6 +5993,10 @@ "oss_object_domain": { "type": "string", "example": "oss域名" + }, + "oss_option": { + "type": "string", + "example": "oss上传文件类型选项,以逗号分割" } } }, @@ -6022,6 +6026,10 @@ "oss_object_domain": { "type": "string", "example": "oss域名" + }, + "oss_option": { + "type": "string", + "example": "oss上传文件类型选项,以逗号分割" } } }, @@ -6332,8 +6340,37 @@ } } }, - "md.AdvertisingFunctionResp": { - "type": "object" + "md.AdvertisingFunctionListResp": { + "type": "object", + "properties": { + "adv_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AdvertisingFunctionList" + } + }, + "select_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "total": { + "type": "integer" + } + } }, "md.AdvertisingLimit": { "type": "object", @@ -6376,6 +6413,30 @@ } } }, + "md.AdvertisingList": { + "type": "object", + "properties": { + "counting_down": { + "type": "string", + "example": "倒计时 单位秒" + }, + "id": { + "type": "string" + }, + "info": { + "type": "string", + "example": "广告位配置 {\"chuanshanjia\":{\"android_ad_id\":[\"\"],\"ios_ad_id\":[\"\"]}}" + }, + "kind": { + "type": "string", + "example": "广告类型(1:开屏广告 2:插屏广告 3:激励视频 4:信息流广告 5:全屏视频)" + }, + "name": { + "type": "string", + "example": "名称" + } + } + }, "md.AdvertisingListReq": { "type": "object", "properties": { @@ -6393,8 +6454,28 @@ } } }, - "md.AdvertisingResp": { - "type": "object" + "md.AdvertisingListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.AdvertisingList" + } + }, + "select_data": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "total": { + "type": "integer" + } + } }, "md.AdvertisingSaveReq": { "type": "object", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 7cd39d8..fd5403c 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -175,6 +175,9 @@ definitions: oss_object_domain: example: oss域名 type: string + oss_option: + example: oss上传文件类型选项,以逗号分割 + type: string type: object applet_app_md_setCenter_oss_aliyun.SetBasicReq: properties: @@ -196,6 +199,9 @@ definitions: oss_object_domain: example: oss域名 type: string + oss_option: + example: oss上传文件类型选项,以逗号分割 + type: string type: object md.ActivePointsWalletNode: properties: @@ -413,7 +419,26 @@ definitions: page: type: string type: object - md.AdvertisingFunctionResp: + md.AdvertisingFunctionListResp: + properties: + adv_data: + items: + additionalProperties: + type: string + type: object + type: array + list: + items: + $ref: '#/definitions/md.AdvertisingFunctionList' + type: array + select_data: + items: + additionalProperties: + type: string + type: object + type: array + total: + type: integer type: object md.AdvertisingLimit: properties: @@ -445,6 +470,23 @@ definitions: example: 提现弹窗文字 type: string type: object + md.AdvertisingList: + properties: + counting_down: + example: 倒计时 单位秒 + type: string + id: + type: string + info: + example: 广告位配置 {"chuanshanjia":{"android_ad_id":[""],"ios_ad_id":[""]}} + type: string + kind: + example: 广告类型(1:开屏广告 2:插屏广告 3:激励视频 4:信息流广告 5:全屏视频) + type: string + name: + example: 名称 + type: string + type: object md.AdvertisingListReq: properties: kind: @@ -456,7 +498,20 @@ definitions: page: type: string type: object - md.AdvertisingResp: + md.AdvertisingListResp: + properties: + list: + items: + $ref: '#/definitions/md.AdvertisingList' + type: array + select_data: + items: + additionalProperties: + type: string + type: object + type: array + total: + type: integer type: object md.AdvertisingSaveReq: properties: @@ -3875,7 +3930,7 @@ paths: "200": description: 具体数据 schema: - $ref: '#/definitions/md.AdvertisingFunctionResp' + $ref: '#/definitions/md.AdvertisingFunctionListResp' "400": description: 具体错误 schema: @@ -3987,7 +4042,7 @@ paths: "200": description: 具体数据 schema: - $ref: '#/definitions/md.AdvertisingResp' + $ref: '#/definitions/md.AdvertisingListResp' "400": description: 具体错误 schema: