From 0b3133f21e3f1c2e0a20c6a3130770cae4db0be3 Mon Sep 17 00:00:00 2001 From: Jon Banafato Date: Sat, 21 Jun 2025 14:17:06 -0400 Subject: [PATCH] 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. --- .tests/schemas.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.tests/schemas.py b/.tests/schemas.py index b1f4c31008..edf6adbec8 100644 --- a/.tests/schemas.py +++ b/.tests/schemas.py @@ -1,3 +1,4 @@ +from pathlib import Path import argparse import json import os @@ -10,7 +11,10 @@ def check_schemas(data_root, schemas_dir, verbose=False): schemas = ('category.json', 'video.json') - all_file_paths = get_json_files(data_root) + all_file_paths = get_json_files( + data_root, + exclude=set(Path(schemas_dir).rglob('*.json')), + ) error_count = 0