10 11 12 13 14
# File 'lib/lurker/json/concerns/validatable.rb', line 10 def to_validation_schema set_additional_properties_false_on(to_hash).tap do |schema| schema[Json::ID] = "file://#{uri}" end end
5 6 7 8
# File 'lib/lurker/json/concerns/validatable.rb', line 5 def validate(data) Lurker::Validator.new(to_validation_schema, data, record_errors: true).validate.map { |error| "- #{error}" } end