Skip to content

Commit a8aa93e

Browse files
authored
Merge pull request #174 from pradhyum6144/fix/schema-draft-version
fix: update JSON schema from draft-04 to draft 2020-12
2 parents 0db1275 + fe63fc3 commit a8aa93e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

schema/config-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "Model Artifact Configuration Schema",
3-
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
44
"$id": "https://github.com/modelpack/model-spec/config",
55
"type": "object",
66
"properties": {

schema/validator.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func (v Validator) validateSchema(src io.Reader) error {
5858
}
5959

6060
c := jsonschema.NewCompiler()
61+
c.AssertFormat = true
6162

6263
// load the schema files from the embedded FS
6364
dir, err := specFS.ReadDir(".")

0 commit comments

Comments
 (0)