diff --git a/compile.py b/compile.py index 7f6a7b1..bb63ca7 100755 --- a/compile.py +++ b/compile.py @@ -18,7 +18,7 @@ import os.path import sys import json -import validictory +import jsonschema import audit if sys.version_info < (3,): @@ -76,8 +76,8 @@ def validate(stream): def valid_schema(obj): try: - validictory.validate(obj, schema) - except validictory.validator.RequiredFieldValidationError: + jsonschema.validate(obj, schema) + except jsonschema.exceptions.ValidationError: print("Failure to validate {id}".format(**obj)) raise diff --git a/requirements.txt b/requirements.txt index 4261601..03cd456 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -validictory +jsonschema boto diff --git a/schema/license.json b/schema/license.json index f9b71fc..bbb1eee 100644 --- a/schema/license.json +++ b/schema/license.json @@ -14,7 +14,6 @@ } } }, - "required": true, "type": "array" }, "keywords": { @@ -37,7 +36,6 @@ }, "type": "object" }, - "required": true, "type": "array" }, "name": { @@ -58,11 +56,9 @@ }, "type": "object" }, - "required": true, "type": "array" }, "superseded_by": { - "required": false, "type": [ "null", "string" @@ -86,5 +82,10 @@ "type": "array" } }, + "required": [ + "identifiers", + "links", + "other_names" + ], "type": "object" }