fix(openapi): 补回图片异步响应契约

为 Images 生成与编辑接口重新声明 X-Async 参数和 202 TaskAcceptedResponse,保持 OpenAPI 与真实运行时行为一致。

已重新生成 Swagger,并通过 HTTP API 测试和桌面端生成客户端类型检查验证。
This commit is contained in:
2026-07-22 15:43:32 +08:00
parent 0b7c46cca9
commit 2812cadd4f
3 changed files with 47 additions and 0 deletions
+26
View File
@@ -5938,6 +5938,7 @@
"BearerAuth": []
}
],
"description": "默认同步返回 OpenAI-compatible Images 响应;设置 X-Async=true 时异步创建任务并返回 202。",
"consumes": [
"application/json"
],
@@ -5957,6 +5958,12 @@
"schema": {
"$ref": "#/definitions/httpapi.TaskRequest"
}
},
{
"type": "boolean",
"description": "true 时异步创建任务并返回 202",
"name": "X-Async",
"in": "header"
}
],
"responses": {
@@ -5966,6 +5973,12 @@
"$ref": "#/definitions/httpapi.CompatibleResponse"
}
},
"202": {
"description": "Accepted",
"schema": {
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
@@ -6000,6 +6013,7 @@
"BearerAuth": []
}
],
"description": "默认同步返回 OpenAI-compatible Images 响应;设置 X-Async=true 时异步创建任务并返回 202。",
"consumes": [
"application/json"
],
@@ -6019,6 +6033,12 @@
"schema": {
"$ref": "#/definitions/httpapi.TaskRequest"
}
},
{
"type": "boolean",
"description": "true 时异步创建任务并返回 202",
"name": "X-Async",
"in": "header"
}
],
"responses": {
@@ -6028,6 +6048,12 @@
"$ref": "#/definitions/httpapi.CompatibleResponse"
}
},
"202": {
"description": "Accepted",
"schema": {
"$ref": "#/definitions/httpapi.TaskAcceptedResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {