lib/schemacop/v3/node.rb in schemacop-3.0.9 vs lib/schemacop/v3/node.rb in schemacop-3.0.10

- old
+ new

@@ -204,10 +204,10 @@ end # Validate type # if allowed_types.any? && allowed_types.keys.none? { |c| data.send(type_assertion_method, c) } collection = allowed_types.values.map { |t| "\"#{t}\"" }.uniq.sort.join(' or ') - result.error %(Invalid type, expected #{collection}.) + result.error "Invalid type, got type \"#{data.class}\", expected #{collection}." return nil end # Validate enums # if @enum && !@enum.include?(data)