Class: JSON::Schema::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/json-schema/validator.rb

Class Method Summary collapse

Class Method Details

.build_fragment(fragments) ⇒ Object



53
54
55
# File 'lib/json-schema/validator.rb', line 53

def self.build_fragment(fragments)
  "#/#{fragments.join('/')}"
end

.validate(current_schema, data, fragments, processor, validator, options = {}) ⇒ Object



50
51
# File 'lib/json-schema/validator.rb', line 50

def self.validate(current_schema, data, fragments, processor, validator, options = {})
end

.validation_error(processor, message, fragments, current_schema, failed_attribute, record_errors) ⇒ Object



57
58
59
60
61
62
63
64
# File 'lib/json-schema/validator.rb', line 57

def self.validation_error(processor, message, fragments, current_schema, failed_attribute, record_errors)
  error = ValidationError.new(message, fragments, failed_attribute, current_schema)
  if record_errors
    processor.validation_error(error)
  else
    raise error
  end
end

.validation_errors(validator) ⇒ Object



66
67
68
# File 'lib/json-schema/validator.rb', line 66

def self.validation_errors(validator)
  validator.validation_errors
end