From 61f2f8fd31992de325f6f03f0fda0a81a9a848e0 Mon Sep 17 00:00:00 2001 From: Harry Date: Tue, 26 Aug 2025 16:02:58 +0800 Subject: [PATCH] refactor(schemas): update titles in JSON schemas for consistency and clarity --- api/core/schemas/builtin/schemas/v1/file.json | 2 +- api/core/schemas/builtin/schemas/v1/general_structure.json | 2 +- api/core/schemas/builtin/schemas/v1/parent_child_structure.json | 2 +- api/core/schemas/builtin/schemas/v1/qa_structure.json | 2 +- api/core/schemas/registry.py | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/core/schemas/builtin/schemas/v1/file.json b/api/core/schemas/builtin/schemas/v1/file.json index 7a43d385af..879752407c 100644 --- a/api/core/schemas/builtin/schemas/v1/file.json +++ b/api/core/schemas/builtin/schemas/v1/file.json @@ -3,7 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "version": "1.0.0", "type": "object", - "title": "File Schema", + "title": "File", "description": "Schema for file objects (v1)", "properties": { "name": { diff --git a/api/core/schemas/builtin/schemas/v1/general_structure.json b/api/core/schemas/builtin/schemas/v1/general_structure.json index fb8a84339c..90283b7a2c 100644 --- a/api/core/schemas/builtin/schemas/v1/general_structure.json +++ b/api/core/schemas/builtin/schemas/v1/general_structure.json @@ -3,7 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "version": "1.0.0", "type": "array", - "title": "General Structure Schema", + "title": "General Structure", "description": "Schema for general structure (v1) - array of strings", "items": { "type": "string" diff --git a/api/core/schemas/builtin/schemas/v1/parent_child_structure.json b/api/core/schemas/builtin/schemas/v1/parent_child_structure.json index cb4be4f21f..bee4b4369c 100644 --- a/api/core/schemas/builtin/schemas/v1/parent_child_structure.json +++ b/api/core/schemas/builtin/schemas/v1/parent_child_structure.json @@ -3,7 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "version": "1.0.0", "type": "object", - "title": "Parent-Child Structure Schema", + "title": "Parent-Child Structure", "description": "Schema for parent-child structure (v1)", "properties": { "parent_mode": { diff --git a/api/core/schemas/builtin/schemas/v1/qa_structure.json b/api/core/schemas/builtin/schemas/v1/qa_structure.json index ce1f0dcb9c..d320e246d0 100644 --- a/api/core/schemas/builtin/schemas/v1/qa_structure.json +++ b/api/core/schemas/builtin/schemas/v1/qa_structure.json @@ -3,7 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "version": "1.0.0", "type": "object", - "title": "Q&A Structure Schema", + "title": "Q&A Structure", "description": "Schema for question-answer structure (v1)", "properties": { "qa_chunks": { diff --git a/api/core/schemas/registry.py b/api/core/schemas/registry.py index c9bf20cd63..64765cee9f 100644 --- a/api/core/schemas/registry.py +++ b/api/core/schemas/registry.py @@ -123,6 +123,7 @@ class SchemaRegistry: for schema_name, schema in version_schemas.items(): result.append({ "name": schema_name, + "label": schema.get("title", schema_name), "schema": schema })