lib/json-schema/attributes/ref.rb in json-schema-0.9.12 vs lib/json-schema/attributes/ref.rb in json-schema-1.0.0
- old
+ new
@@ -42,12 +42,13 @@
end
end
# We have the schema finally, build it and validate!
schema = JSON::Schema.new(target_schema,temp_uri,validator)
- schema.validate(data, fragments)
+ schema.validate(data, fragments, options)
else
- raise ValidationError.new("The referenced schema '#{temp_uri.to_s}' cannot be found", fragments, current_schema)
+ message = "The referenced schema '#{temp_uri.to_s}' cannot be found"
+ validation_error(message, fragments, current_schema, options[:record_errors])
end
end
end
end
end