Skip to content

Commit

Permalink
snapshotEngine: Proper schema validation (#567)
Browse files Browse the repository at this point in the history
* loads instead of string for schema validation

* typo in log message
  • Loading branch information
orcutt989 authored Mar 28, 2023
1 parent 090f695 commit eb9b3db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snapshotEngine/getAllSnapshotMetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")

Expand Down

0 comments on commit eb9b3db

Please sign in to comment.