We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 017232e commit 7506291Copy full SHA for 7506291
tests/test_schema_integrity.py
@@ -3,7 +3,7 @@
3
"""
4
5
import json
6
-import os.path
+import os
7
import sys
8
9
import jsonref
@@ -38,3 +38,16 @@ def test_meta_schema_is_in_sync():
38
actual = json.load(f)
39
40
assert actual == get_metaschema(), "Run: python manage.py pre-commit"
41
+
42
43
+def test_meta_schema_references():
44
+ with open("schema/meta-schema.json") as f:
45
+ metaschema = json.load(f)
46
47
+ for file_name in os.listdir("schema"):
48
+ if file_name.endswith("-schema.json") and "meta-schema" not in file_name:
49
+ file_path = os.path.join("schema", file_name)
50
+ with open(file_path) as f:
51
+ schema = json.load(f)
52
53
+ assert schema["$schema"] == metaschema["id"], f"Incorrect $schema in {file_name}: {schema['$schema']}"
0 commit comments