From 71d449cd1a75cddb925ceb4669cee16ad2e1ca36 Mon Sep 17 00:00:00 2001 From: Linghong Date: Thu, 9 Jul 2026 13:00:37 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E9=BD=90=E5=A4=96=E9=83=A8=20OpenAPI?= =?UTF-8?q?=20=E7=BC=BA=E5=A4=B1=E7=9A=84=20screenColor=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 四条外部生成端点(生图 / 图标 / UI 素材 / 角色动画)后端都接收 screen_color,但公开 OpenAPI 一个都没声明,且 additionalProperties:false 会挡掉客户端传该字段。三条生图的漂移在 master 已存在,本分支给动画请求 新增该字段后又多一处,一并补齐。 - EditorImageGenerationRequest / EditorIconSpritesheetGenerationRequest / EditorUiDesignAssetExtractionRequest / EditorCharacterAnimationGenerationRequest 各加可选 screenColor(nullable string,不进 required,additionalProperties 保留)。 - 描述如实:传色板 hex 指定,auto/null/省略由服务端自动决策;删掉动画那条 原描述里"通常继承源角色图背景色"的不实表述(继承未实现)。 - 后端行为零改动,纯契约对齐。 Co-Authored-By: Claude Opus 4.8 --- .../genarrative-external-v1.openapi.json | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/openapi/genarrative-external-v1.openapi.json b/docs/openapi/genarrative-external-v1.openapi.json index fd8dee488..67596e4dd 100644 --- a/docs/openapi/genarrative-external-v1.openapi.json +++ b/docs/openapi/genarrative-external-v1.openapi.json @@ -2508,6 +2508,13 @@ "type": "string", "minLength": 1 }, + "screenColor": { + "type": [ + "string", + "null" + ], + "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" + }, "size": { "type": "string", "description": "兼容旧 size 入参;未传 aspectRatio/imageSize 时生效。", @@ -2872,6 +2879,13 @@ "type": "string" } }, + "screenColor": { + "type": [ + "string", + "null" + ], + "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" + }, "model": { "type": "string", "default": "gemini-3.1-flash-image-preview" @@ -2937,6 +2951,13 @@ "type": "string", "description": "UI 设计图 Data URL 或 objectKey。" }, + "screenColor": { + "type": [ + "string", + "null" + ], + "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" + }, "model": { "type": "string", "default": "gemini-3.1-flash-image-preview", @@ -3163,6 +3184,13 @@ "minLength": 1, "maxLength": 4000 }, + "screenColor": { + "type": [ + "string", + "null" + ], + "description": "纯色抠像背景色。可传画布支持的纯色背景 hex(如 #CFEFFF)指定;传 \"auto\"、null 或省略则由服务端自动决策。" + }, "resolution": { "type": "string", "enum": [