There was an error while loading. Please reload this page.
1 parent 635ab7e commit 4ecee3cCopy full SHA for 4ecee3c
1 file changed
Makefile
@@ -0,0 +1,27 @@
1
+.PHONY: validate validate-json validate-control-plane
2
+
3
+validate: validate-json validate-control-plane
4
5
+validate-json:
6
+ python3 - <<'PY'
7
+ import json
8
+ import pathlib
9
+ import sys
10
11
+ failed = False
12
+ for root in (pathlib.Path('schemas'), pathlib.Path('examples')):
13
+ if not root.exists():
14
+ continue
15
+ for path in sorted(root.rglob('*.json')):
16
+ try:
17
+ json.loads(path.read_text())
18
+ except Exception as exc:
19
+ print(f'{path}: invalid JSON: {exc}', file=sys.stderr)
20
+ failed = True
21
+ if failed:
22
+ raise SystemExit(1)
23
+ print('JSON syntax validated.')
24
+ PY
25
26
+validate-control-plane:
27
+ python3 tools/validate_control_plane_examples.py
0 commit comments