Skip to content

Commit e6610e6

Browse files
authored
Bump JSONSchema dependency (#1090)
1 parent 58df878 commit e6610e6

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BenchmarkTools = "0.4, 0.5"
2020
CodecBzip2 = "~0.6, 0.7"
2121
CodecZlib = "~0.6, 0.7"
2222
JSON = "~0.21"
23-
JSONSchema = "0.2"
23+
JSONSchema = "0.3"
2424
MutableArithmetics = "0.2"
2525
OrderedCollections = "1"
2626
julia = "1"

src/FileFormats/MOF/MOF.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ function validate(io::IO)
105105
object = JSON.parse(io)
106106
seekstart(io)
107107
mof_schema = JSONSchema.Schema(JSON.parsefile(SCHEMA_PATH, use_mmap=false))
108-
if !JSONSchema.isvalid(object, mof_schema)
109-
error("Unable to read file because it does not conform to the MOF " *
110-
"schema: ", JSONSchema.diagnose(object, mof_schema))
108+
ret = JSONSchema.validate(object, mof_schema)
109+
if ret !== nothing
110+
error(
111+
"Unable to read file because it does not conform to the MOF " *
112+
"schema: ", ret
113+
)
111114
end
112115
return
113116
end

0 commit comments

Comments
 (0)