From eb9b3dbed2242849db89601efb752c8dd96ab899 Mon Sep 17 00:00:00 2001 From: Jimmy <5608027+orcutt989@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:03:00 -0400 Subject: [PATCH] snapshotEngine: Proper schema validation (#567) * loads instead of string for schema validation * typo in log message --- snapshotEngine/getAllSnapshotMetadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapshotEngine/getAllSnapshotMetadata.py b/snapshotEngine/getAllSnapshotMetadata.py index 08689d0cf..43f63d79b 100644 --- a/snapshotEngine/getAllSnapshotMetadata.py +++ b/snapshotEngine/getAllSnapshotMetadata.py @@ -48,8 +48,8 @@ schema = f.read() # json.validate() returns None if successful -if not validate(metadata_document, json.loads(schema)): - print("Metadata sucessfully validated against schema!") +if not validate(json.loads(metadata_document), json.loads(schema)): + print("Metadata successfully validated against schema!") else: raise Exception("Metadata NOT validated against schema!")