From ed84a5f71533a7073a542e92c81703397a8f10b0 Mon Sep 17 00:00:00 2001 From: Frost-ZX Date: Wed, 13 Mar 2024 13:23:18 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=20JSON=20Schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data.json | 1 + data.schema.json | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 data.schema.json diff --git a/data.json b/data.json index 58cb023..d916a53 100644 --- a/data.json +++ b/data.json @@ -1,4 +1,5 @@ { + "$schema": "./data.schema.json", "timeline": [ { "startTime": "2024-03-10 21:27", diff --git a/data.schema.json b/data.schema.json new file mode 100644 index 0000000..241063a --- /dev/null +++ b/data.schema.json @@ -0,0 +1,44 @@ +{ + "type": "object", + "required": [ + "timeline" + ], + "properties": { + "timeline": { + "type": "array", + "title": "时间线", + "items": { + "type": "object", + "required": [ + "startTime", + "endTime" + ], + "properties": { + "startTime": { + "type": "string", + "title": "开始时间" + }, + "endTime": { + "type": "string", + "title": "结束时间" + }, + "content": { + "type": "string", + "title": "直播内容", + "default": "" + } + }, + "defaultSnippets": [ + { + "label": "基础格式", + "body": { + "startTime": "", + "endTime": "", + "content": "" + } + } + ] + } + } + } +} \ No newline at end of file