json_schema 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
|