From 2e77fee46136baa4eff6ced0de94f66f07142b13 Mon Sep 17 00:00:00 2001 From: ClementTsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:16:55 -0500 Subject: [PATCH 1/2] ci: update jsonschema to 0.26.1 for schema validation --- scripts/schema/requirements.txt | 2 +- scripts/schema/validator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/schema/requirements.txt b/scripts/schema/requirements.txt index b87036296..fd1837ba9 100644 --- a/scripts/schema/requirements.txt +++ b/scripts/schema/requirements.txt @@ -1 +1 @@ -jsonschema-rs == 0.18.0 +jsonschema-rs == 0.26.1 diff --git a/scripts/schema/validator.py b/scripts/schema/validator.py index d0de01da4..4a0bdf93a 100644 --- a/scripts/schema/validator.py +++ b/scripts/schema/validator.py @@ -40,7 +40,7 @@ def main(): with open(file, "rb") as f, open(schema) as s: try: - validator = jsonschema_rs.JSONSchema.from_str(s.read()) + validator = jsonschema_rs.validator_for(s.read()) except: print("Couldn't create validator.") exit() From d2964da50587f11bcc40ac732d3c17aced3c49e3 Mon Sep 17 00:00:00 2001 From: ClementTsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:26:05 -0500 Subject: [PATCH 2/2] make sure to rerun schema validation --- .github/workflows/validate_schema.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validate_schema.yml b/.github/workflows/validate_schema.yml index c5a2ff922..46e606a1a 100644 --- a/.github/workflows/validate_schema.yml +++ b/.github/workflows/validate_schema.yml @@ -9,6 +9,7 @@ on: - main paths: - "schema/**" + - "scripts/schema/**" - ".github/workflows/validate_schema.yml" concurrency: