mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-06 07:48:50 -06:00
Fix validation error on JSONSchema 0.3
This commit is contained in:
@@ -12,14 +12,10 @@ function validate(json, schema)
|
||||
result = JSONSchema.validate(json, schema)
|
||||
if result !== nothing
|
||||
if result isa JSONSchema.SingleIssue
|
||||
path = join(result.path, " → ")
|
||||
if length(path) == 0
|
||||
path = "root"
|
||||
end
|
||||
msg = "$(result.msg) in $(path)"
|
||||
msg = "$(result.reason) in $(result.path)"
|
||||
else
|
||||
msg = convert(String, result)
|
||||
end
|
||||
throw(msg)
|
||||
throw("Error parsing input file: $(msg)")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user