lib/jsi/schema/validation/object.rb in jsi-0.6.0 vs lib/jsi/schema/validation/object.rb in jsi-0.7.0

- old
+ new

@@ -2,11 +2,11 @@ module JSI module Schema::Validation::MinMaxProperties # @private def internal_validate_maxProperties(result_builder) - if schema_content.key?('maxProperties') + if keyword?('maxProperties') value = schema_content['maxProperties'] # The value of this keyword MUST be a non-negative integer. if internal_integer?(value) && value >= 0 if result_builder.instance.respond_to?(:to_hash) # An object instance is valid against "maxProperties" if its number of properties is less than, or equal to, the value of this keyword. @@ -22,10 +22,10 @@ end end # @private def internal_validate_minProperties(result_builder) - if schema_content.key?('minProperties') + if keyword?('minProperties') value = schema_content['minProperties'] # The value of this keyword MUST be a non-negative integer. if internal_integer?(value) && value >= 0 if result_builder.instance.respond_to?(:to_hash) # An object instance is valid against "minProperties" if its number of properties is greater than, or equal to, the value of this keyword.