Skip to content

Commit 54f4cf4

Browse files
author
Chiara Rasi
committed
Change validator model in validate function
1 parent 7c0a8a3 commit 54f4cf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

preClinVar/validate.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
from typing import List, Tuple
44

5-
from jsonschema import Draft3Validator, validate
5+
from jsonschema import Draft7Validator, validate
66

77
from preClinVar.resources import subm_schema_path
88

@@ -14,7 +14,8 @@ def validate_submission(submission_dict: dict) -> Tuple[bool, List[str]]:
1414
errors = []
1515
with open(subm_schema_path) as schema_file:
1616
schema = json.load(schema_file)
17-
v = Draft3Validator(schema)
17+
18+
v = Draft7Validator(schema)
1819
for error in sorted(v.iter_errors(submission_dict), key=str):
1920
errors.append(error.message)
2021

0 commit comments

Comments
 (0)