We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 090f291 commit 3fe552dCopy full SHA for 3fe552d
1 file changed
tests/schemas/test_json_schema_up_to_date.py
@@ -0,0 +1,19 @@
1
+import json
2
+from pathlib import Path
3
+
4
+from dbt_jobs_as_code.schemas.config import generate_config_schema
5
6
+SCHEMA_PATH = Path("src/dbt_jobs_as_code/schemas/load_job_schema.json")
7
8
9
+def test_json_schema_is_up_to_date():
10
+ """Ensure the committed JSON schema matches what the models generate.
11
12
+ If this fails, run: `dbt-jobs-as-code update-json-schema`
13
+ """
14
+ committed = json.loads(SCHEMA_PATH.read_text())
15
+ generated = json.loads(generate_config_schema())
16
+ assert committed == generated, (
17
+ "The committed JSON schema is out of date. "
18
+ "Run `dbt-jobs-as-code update-json-schema` to regenerate it."
19
+ )
0 commit comments