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
+3
View File
@@ -1267,12 +1267,15 @@ func openAIEmbeddingsDoc() {}
// openAIImagesDoc godoc
// @Summary 创建或编辑 OpenAI Images
// @Description 默认同步返回 OpenAI-compatible Images 响应;设置 X-Async=true 时异步创建任务并返回 202。
// @Tags images
// @Accept json
// @Produce json
// @Security BearerAuth
// @Param input body TaskRequest true "OpenAI Images 请求"
// @Param X-Async header bool false "true 时异步创建任务并返回 202"
// @Success 200 {object} CompatibleResponse
// @Success 202 {object} TaskAcceptedResponse
// @Failure 400 {object} OpenAIErrorEnvelope
// @Failure 401 {object} OpenAIErrorEnvelope
// @Failure 429 {object} OpenAIErrorEnvelope