From 4b76de395d233c9a7bedf6fd57a5a496e8d25078 Mon Sep 17 00:00:00 2001 From: Vijay Sarvepalli Date: Fri, 12 Jul 2024 17:24:07 -0400 Subject: [PATCH] Added schemaVersion field and update code --- .../schema/v1/Decision_Point_Group-1-0-1.schema.json | 3 ++- src/test/test_schema.py | 12 ++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/data/schema/v1/Decision_Point_Group-1-0-1.schema.json b/data/schema/v1/Decision_Point_Group-1-0-1.schema.json index 185460ed..b1c1a4e7 100644 --- a/data/schema/v1/Decision_Point_Group-1-0-1.schema.json +++ b/data/schema/v1/Decision_Point_Group-1-0-1.schema.json @@ -39,7 +39,8 @@ "version", "name", "description", - "decision_points" + "decision_points", + "schemaVersion" ] } }, diff --git a/src/test/test_schema.py b/src/test/test_schema.py index ade11eaf..2ee2bf1d 100644 --- a/src/test/test_schema.py +++ b/src/test/test_schema.py @@ -33,17 +33,13 @@ from ssvc.dp_groups.ssvc.collections import SSVCv1, SSVCv2, SSVCv2_1 # noqa def retrieve_local(uri): - fileuri = uri.replace("https://certcc.github.io/SSVC", "") - mypath = os.path.dirname(__file__) - rpath = os.getcwd() - path = mypath + "/../.." + fileuri - print(path) - if os.path.exists(path): - fh = open(path) + fileuri = uri.replace("https://certcc.github.io/SSVC", os.getcwd()) + if os.path.exists(fileuri): + fh = open(fileuri) schema = json.load(fh) fh.close() return Resource.from_contents(schema) - raise FileNotFoundError(f"Could not find {path} {mypath} {rpath}") + raise FileNotFoundError(f"Could not find DEBUG path issues {fileuri}") registry = Registry(retrieve=retrieve_local)