lib/json-schema/attributes/maxproperties.rb in json-schema-2.2.5 vs lib/json-schema/attributes/maxproperties.rb in json-schema-2.3.0

- old
+ new

@@ -1,5 +1,7 @@ +require 'json-schema/attribute' + module JSON class Schema class MaxPropertiesAttribute < Attribute def self.validate(current_schema, data, fragments, processor, validator, options = {}) if data.is_a?(Hash) && (data.size > current_schema.schema['maxProperties']) @@ -7,6 +9,6 @@ validation_error(processor, message, fragments, current_schema, self, options[:record_errors]) end end end end -end \ No newline at end of file +end