json_schema 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/commands/validate_schema.rb +3 -6
- metadata +1 -1
@@ -48,8 +48,7 @@ module Commands
|
|
48
48
|
if valid
|
49
49
|
@messages += ["#{data_file} is valid."]
|
50
50
|
else
|
51
|
-
@errors =
|
52
|
-
map_schema_errors(data_file, errors)
|
51
|
+
@errors = map_schema_errors(data_file, errors)
|
53
52
|
end
|
54
53
|
end
|
55
54
|
|
@@ -94,15 +93,13 @@ module Commands
|
|
94
93
|
|
95
94
|
parser = JsonSchema::Parser.new
|
96
95
|
if !(schema = parser.parse(JSON.parse(File.read(file))))
|
97
|
-
@errors =
|
98
|
-
map_schema_errors(file, parser.errors)
|
96
|
+
@errors = map_schema_errors(file, parser.errors)
|
99
97
|
return nil
|
100
98
|
end
|
101
99
|
|
102
100
|
expander = JsonSchema::ReferenceExpander.new
|
103
101
|
if !expander.expand(schema, store: @store)
|
104
|
-
@errors =
|
105
|
-
map_schema_errors(file, expander.errors)
|
102
|
+
@errors = map_schema_errors(file, expander.errors)
|
106
103
|
return nil
|
107
104
|
end
|
108
105
|
|