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.
Files changed (2) hide show
  1. data/lib/commands/validate_schema.rb +3 -6
  2. 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 = ["#{data_file}: Invalid."] +
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 = ["#{file}: Schema is invalid."] +
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 = ["#{file}: Could not expand schema references."] +
105
- map_schema_errors(file, expander.errors)
102
+ @errors = map_schema_errors(file, expander.errors)
106
103
  return nil
107
104
  end
108
105
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: