From f0e71769a4e7bdeb5a7e6181671ac3f36d215e4d Mon Sep 17 00:00:00 2001 From: lyzno1 Date: Tue, 5 Aug 2025 20:25:55 +0800 Subject: [PATCH] fix(ja-jp): establish strong dependency between transfer_method and file parameters - Replace loose `oneOf` validation with strict conditional dependencies using `anyOf` - `transfer_method: "remote_url"` now requires `url` and prohibits `upload_file_id` - `transfer_method: "local_file"` now requires `upload_file_id` and prohibits `url` - Applied same fix pattern as English version to all Japanese OpenAPI files - Prevents invalid combinations like remote_url + upload_file_id Fixed files: - ja-jp/openapi_workflow.json (InputFileObjectWorkflowJp) - ja-jp/openapi_chatflow.json (InputFileObjectJp) - ja-jp/openapi_chat.json (BasicInputFileObjectJa) - ja-jp/openapi_completion.json (InputFileObjectJp) --- ja-jp/openapi_chat.json | 25 +++++++++++++++++++++---- ja-jp/openapi_chatflow.json | 25 +++++++++++++++++++++---- ja-jp/openapi_completion.json | 25 +++++++++++++++++++++---- ja-jp/openapi_workflow.json | 25 +++++++++++++++++++++---- 4 files changed, 84 insertions(+), 16 deletions(-) diff --git a/ja-jp/openapi_chat.json b/ja-jp/openapi_chat.json index 7a3ff022..9c58af72 100644 --- a/ja-jp/openapi_chat.json +++ b/ja-jp/openapi_chat.json @@ -310,11 +310,28 @@ "type": "object", "required": ["type", "transfer_method"], "properties": { "type": { "type": "string", "enum": ["image"], "description": "サポートされているタイプ:`image`(現在は画像タイプのみサポート)。" }, - "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。" }, - "url": { "type": "string", "format": "url", "description": "画像URL(転送方法が`remote_url`の場合)。" }, - "upload_file_id": { "type": "string", "format":"uuid", "description": "アップロードされたファイルID(転送方法が`local_file`の場合)。" } + "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。remote_url は画像URL / local_file はファイルアップロード用" }, + "url": { "type": "string", "format": "url", "description": "画像URL(転送方法が remote_url の場合)" }, + "upload_file_id": { "type": "string", "format":"uuid", "description": "アップロードされたファイルID、事前にファイルアップロードAPIで取得する必要があります(転送方法が local_file の場合)" } }, - "oneOf": [ {"required": ["url"]}, {"required": ["upload_file_id"]} ] + "anyOf": [ + { + "properties": { + "transfer_method": { "enum": ["remote_url"] }, + "url": { "type": "string", "format": "url" } + }, + "required": ["url"], + "not": { "required": ["upload_file_id"] } + }, + { + "properties": { + "transfer_method": { "enum": ["local_file"] }, + "upload_file_id": { "type": "string", "format":"uuid" } + }, + "required": ["upload_file_id"], + "not": { "required": ["url"] } + } + ] }, "ChatCompletionResponseJa": { "type": "object", "description": "ブロッキングモードでの完全なアプリ結果。", diff --git a/ja-jp/openapi_chatflow.json b/ja-jp/openapi_chatflow.json index 1d9008ec..8b935060 100644 --- a/ja-jp/openapi_chatflow.json +++ b/ja-jp/openapi_chatflow.json @@ -482,11 +482,28 @@ "required": ["type", "transfer_method"], "properties": { "type": { "type": "string", "enum": ["document", "image", "audio", "video", "custom"], "description": "ファイルタイプ。document: TXT,MD,PDF等; image: JPG,PNG等; audio: MP3,WAV等; video: MP4,MOV等; custom: その他。" }, - "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。" }, - "url": { "type": "string", "format": "url", "description": "画像URL(transfer_methodがremote_urlの場合)。" }, - "upload_file_id": { "type": "string", "format":"uuid", "description": "アップロードされたファイルID(transfer_methodがlocal_fileの場合)。" } + "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。remote_url は画像URL / local_file はファイルアップロード用" }, + "url": { "type": "string", "format": "url", "description": "画像URL(転送方法が remote_url の場合)" }, + "upload_file_id": { "type": "string", "format":"uuid", "description": "アップロードされたファイルID、事前にファイルアップロードAPIで取得する必要があります(転送方法が local_file の場合)" } }, - "oneOf": [ {"required": ["url"]}, {"required": ["upload_file_id"]} ] + "anyOf": [ + { + "properties": { + "transfer_method": { "enum": ["remote_url"] }, + "url": { "type": "string", "format": "url" } + }, + "required": ["url"], + "not": { "required": ["upload_file_id"] } + }, + { + "properties": { + "transfer_method": { "enum": ["local_file"] }, + "upload_file_id": { "type": "string", "format":"uuid" } + }, + "required": ["upload_file_id"], + "not": { "required": ["url"] } + } + ] }, "ChatCompletionResponseJp": { "type": "object", "description": "ブロッキングモードでの完全なアプリ結果。", diff --git a/ja-jp/openapi_completion.json b/ja-jp/openapi_completion.json index 668b43ab..8a3075fb 100644 --- a/ja-jp/openapi_completion.json +++ b/ja-jp/openapi_completion.json @@ -214,11 +214,28 @@ "type": "object", "required": ["type", "transfer_method"], "properties": { "type": { "type": "string", "enum": ["image"], "description": "サポートされるタイプ:`image`(現在は画像タイプのみサポート)。" }, - "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。" }, - "url": { "type": "string", "format": "url", "description": "画像URL(`transfer_method`が`remote_url`の場合)。" }, - "upload_file_id": { "type": "string", "format": "uuid", "description": "アップロードされたファイルID(`transfer_method`が`local_file`の場合)。" } + "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。remote_url は画像URL / local_file はファイルアップロード用" }, + "url": { "type": "string", "format": "url", "description": "画像URL(転送方法が remote_url の場合)" }, + "upload_file_id": { "type": "string", "format": "uuid", "description": "アップロードされたファイルID、事前にファイルアップロードAPIで取得する必要があります(転送方法が local_file の場合)" } }, - "oneOf": [ {"required": ["url"]}, {"required": ["upload_file_id"]} ] + "anyOf": [ + { + "properties": { + "transfer_method": { "enum": ["remote_url"] }, + "url": { "type": "string", "format": "url" } + }, + "required": ["url"], + "not": { "required": ["upload_file_id"] } + }, + { + "properties": { + "transfer_method": { "enum": ["local_file"] }, + "upload_file_id": { "type": "string", "format": "uuid" } + }, + "required": ["upload_file_id"], + "not": { "required": ["url"] } + } + ] }, "CompletionResponseJp": { "type": "object", "description": "ブロッキングモードでのアプリの完全な結果。", diff --git a/ja-jp/openapi_workflow.json b/ja-jp/openapi_workflow.json index 77f502af..8ad450d5 100644 --- a/ja-jp/openapi_workflow.json +++ b/ja-jp/openapi_workflow.json @@ -266,11 +266,28 @@ "required": ["type", "transfer_method"], "properties": { "type": { "type": "string", "enum": ["document", "image", "audio", "video", "custom"], "description": "ファイルタイプ。document: TXT,MD,PDF等; image: JPG,PNG等; audio: MP3,WAV等; video: MP4,MOV等; custom: その他。" }, - "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。" }, - "url": { "type": "string", "format": "url", "description": "画像URL (`remote_url`の場合)。" }, - "upload_file_id": { "type": "string", "format": "uuid", "description": "アップロードされたファイルID (`local_file`の場合)。" } + "transfer_method": { "type": "string", "enum": ["remote_url", "local_file"], "description": "転送方法。remote_url は画像URL / local_file はファイルアップロード用" }, + "url": { "type": "string", "format": "url", "description": "画像URL(転送方法が remote_url の場合)" }, + "upload_file_id": { "type": "string", "format": "uuid", "description": "アップロードされたファイルID、事前にファイルアップロードAPIで取得する必要があります(転送方法が local_file の場合)" } }, - "oneOf": [ {"required": ["url"]}, {"required": ["upload_file_id"]} ] + "anyOf": [ + { + "properties": { + "transfer_method": { "enum": ["remote_url"] }, + "url": { "type": "string", "format": "url" } + }, + "required": ["url"], + "not": { "required": ["upload_file_id"] } + }, + { + "properties": { + "transfer_method": { "enum": ["local_file"] }, + "upload_file_id": { "type": "string", "format": "uuid" } + }, + "required": ["upload_file_id"], + "not": { "required": ["url"] } + } + ] }, "WorkflowCompletionResponseJp": { "type": "object", "description": "ブロッキングモードでのワークフロー実行結果。",