From 70d0a6cbf79ffaf33b2dd73a2cd6735ebbd54a50 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:29:30 -0500 Subject: [PATCH] ci: update jsonschema to 0.26.1 for schema validation (#1637) * ci: update jsonschema to 0.26.1 for schema validation * make sure to rerun schema validation --- .github/workflows/validate_schema.yml | 1 + scripts/schema/requirements.txt | 2 +- scripts/schema/validator.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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: 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()