From 44e732754aaa1caf11cf71ce0c6bba3c211562e9 Mon Sep 17 00:00:00 2001 From: C9luster <138663536+C9luster@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:45:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Test=E5=AF=B9Json=20schema?= =?UTF-8?q?=E7=9A=84=E6=A3=80=E6=B5=8B=20(#665)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: yinjiaqi --- python/tests/component_schemas.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/python/tests/component_schemas.py b/python/tests/component_schemas.py index 58a42779..5f70bdaa 100644 --- a/python/tests/component_schemas.py +++ b/python/tests/component_schemas.py @@ -245,6 +245,21 @@ "required": ["filename", "url"] } +json_schema = copy.deepcopy(base_item_schema) +json_schema["$schema"] = "json_schema" +json_schema["properties"]["type"] = { + "type": "string", + "enum": ["json"] +} +json_schema["properties"]["text"] = { + "type": "object", + "properties": { + "data": { + "type": "string" + } + }, + "required": ["data"] +} plan_schema = copy.deepcopy(base_item_schema) plan_schema["$schema"] = "plan_schema" @@ -311,6 +326,7 @@ "image": image_schema, "chart": chart_schema, "audio": audio_schema, + "json": json_schema, "plan": plan_schema, "function_call": function_call_schema, } \ No newline at end of file