lib/json-schema/attributes/enum.rb in json-schema-2.2.5 vs lib/json-schema/attributes/enum.rb in json-schema-2.3.0
- old
+ new
@@ -1,5 +1,7 @@
+require 'json-schema/attribute'
+
module JSON
class Schema
class EnumAttribute < Attribute
def self.validate(current_schema, data, fragments, processor, validator, options = {})
if !current_schema.schema['enum'].include?(data)
@@ -19,6 +21,6 @@
validation_error(processor, message, fragments, current_schema, self, options[:record_errors])
end
end
end
end
-end
\ No newline at end of file
+end