Skip to content

Commit

Permalink
Added schemaVersion field and update code
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-vsarvepalli committed Jul 12, 2024
1 parent 63ff757 commit 4b76de3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion data/schema/v1/Decision_Point_Group-1-0-1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"version",
"name",
"description",
"decision_points"
"decision_points",
"schemaVersion"
]
}
},
Expand Down
12 changes: 4 additions & 8 deletions src/test/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 4b76de3

Please sign in to comment.