mirror of
https://git.fightbot.fun/hxuanyu/BingPaper.git
synced 2026-02-15 12:59:31 +08:00
为 Swagger 文档添加按需抓取支持:新增 enableOnDemandFetch 配置项和相关接口的 202/404 状态描述
This commit is contained in:
112
docs/docs.go
112
docs/docs.go
@@ -440,6 +440,24 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"type": "file"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "按需抓取任务已启动",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "图片未找到,响应体包含具体原因",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -475,6 +493,24 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ImageMetaResp"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "按需抓取任务已启动",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "图片未找到,响应体包含具体原因",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -517,6 +553,24 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"type": "file"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "按需抓取任务已启动",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "图片未找到,响应体包含具体原因",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,6 +599,24 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ImageMetaResp"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "按需抓取任务已启动",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "图片未找到,响应体包含具体原因",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -587,6 +659,24 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"type": "file"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "按需抓取任务已启动",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "图片未找到,响应体包含具体原因",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -615,6 +705,24 @@ const docTemplate = `{
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ImageMetaResp"
|
||||
}
|
||||
},
|
||||
"202": {
|
||||
"description": "按需抓取任务已启动",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "图片未找到,响应体包含具体原因",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -730,6 +838,10 @@ const docTemplate = `{
|
||||
"description": "当请求的地区不存在时,是否回退到默认地区",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enableOnDemandFetch": {
|
||||
"description": "是否启用按需抓取",
|
||||
"type": "boolean"
|
||||
},
|
||||
"mode": {
|
||||
"description": "local | redirect",
|
||||
"type": "string"
|
||||
|
||||
Reference in New Issue
Block a user