lib/jsi/schema/validation/enum.rb in jsi-0.6.0 vs lib/jsi/schema/validation/enum.rb in jsi-0.7.0
- old
+ new
@@ -2,10 +2,10 @@
module JSI
module Schema::Validation::Enum
# @private
def internal_validate_enum(result_builder)
- if schema_content.key?('enum')
+ if keyword?('enum')
value = schema_content['enum']
# The value of this keyword MUST be an array. This array SHOULD have at least one element.
# Elements in the array SHOULD be unique.
if value.respond_to?(:to_ary)
# An instance validates successfully against this keyword if its value is equal to one of the