|
|
@ -12,14 +12,10 @@ function validate(json, schema)
|
|
|
|
result = JSONSchema.validate(json, schema)
|
|
|
|
result = JSONSchema.validate(json, schema)
|
|
|
|
if result !== nothing
|
|
|
|
if result !== nothing
|
|
|
|
if result isa JSONSchema.SingleIssue
|
|
|
|
if result isa JSONSchema.SingleIssue
|
|
|
|
path = join(result.path, " → ")
|
|
|
|
msg = "$(result.reason) in $(result.path)"
|
|
|
|
if length(path) == 0
|
|
|
|
|
|
|
|
path = "root"
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
msg = "$(result.msg) in $(path)"
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
msg = convert(String, result)
|
|
|
|
msg = convert(String, result)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
throw(msg)
|
|
|
|
throw("Error parsing input file: $(msg)")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|