From fe63fc3a3ab14ca8f53a51993d543aa113fabc3b Mon Sep 17 00:00:00 2001 From: pradhyum6144 Date: Wed, 25 Feb 2026 17:32:34 +0530 Subject: [PATCH] fix: update JSON schema from draft-04 to draft 2020-12 Signed-off-by: pradhyum6144 --- schema/config-schema.json | 2 +- schema/validator.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/config-schema.json b/schema/config-schema.json index ce13fcc..6d35afb 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -1,6 +1,6 @@ { "description": "Model Artifact Configuration Schema", - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/modelpack/model-spec/config", "type": "object", "properties": { diff --git a/schema/validator.go b/schema/validator.go index d526ec8..2c053ec 100644 --- a/schema/validator.go +++ b/schema/validator.go @@ -58,6 +58,7 @@ func (v Validator) validateSchema(src io.Reader) error { } c := jsonschema.NewCompiler() + c.AssertFormat = true // load the schema files from the embedded FS dir, err := specFS.ReadDir(".")