From 2d5d31ed8a9d67a9814c3938e7dd63dbd521f88a Mon Sep 17 00:00:00 2001 From: caozhuozi <543481992@qq.com> Date: Thu, 11 Sep 2025 22:21:09 +0800 Subject: [PATCH] json-schema: add datasets url Signed-off-by: caozhuozi <543481992@qq.com> --- schema/config-schema.json | 6 ++++++ schema/config_test.go | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/schema/config-schema.json b/schema/config-schema.json index 1da7bd6..94e88f3 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -71,6 +71,12 @@ "sourceURL": { "type": "string" }, + "datasetsURL": { + "type": "array", + "items": { + "type": "string" + } + }, "version": { "type": "string" }, diff --git a/schema/config_test.go b/schema/config_test.go index 20a691c..fd6b644 100644 --- a/schema/config_test.go +++ b/schema/config_test.go @@ -200,6 +200,29 @@ func TestConfig(t *testing.T) { ] } } +`, + fail: true, + }, + // expected failure: datasetsURL is not an array + { + config: ` +{ + "descriptor": { + "name": "xyz-3-8B-Instruct", + "version": "3.1", + "sourceURL": "https://github.com/xyz/xyz3", + "datasetsURL": "https://example.com/dataset" + }, + "config": { + "paramSize": "8b" + }, + "modelfs": { + "type": "layers", + "diffIds": [ + "sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" + ] + } +} `, fail: true, },