Skip to content

Commit 0b3133f

Browse files
committed
Exclude schema definition files from schema validation checks
Currently, the category schema definition file is included in the list of files that are validated against it. This causes validation errors when the schema validation's strictness is increased, e.g. by disallowing additional properties in #1172. This change excludes schema JSON files from the schema test script to resolve future validation errors.
1 parent 8ebe9a6 commit 0b3133f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.tests/schemas.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from pathlib import Path
12
import argparse
23
import json
34
import os
@@ -10,7 +11,10 @@
1011

1112
def check_schemas(data_root, schemas_dir, verbose=False):
1213
schemas = ('category.json', 'video.json')
13-
all_file_paths = get_json_files(data_root)
14+
all_file_paths = get_json_files(
15+
data_root,
16+
exclude=set(Path(schemas_dir).rglob('*.json')),
17+
)
1418

1519
error_count = 0
1620

0 commit comments

Comments
 (0)