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

- old
+ new

@@ -1,4 +1,6 @@ +require 'json-schema/attribute' + module JSON class Schema class MaxItemsAttribute < Attribute def self.validate(current_schema, data, fragments, processor, validator, options = {}) if data.is_a?(Array) && (data.compact.size > current_schema.schema['maxItems'])