Class: JSON::Schema::Attribute
- Inherits:
-
Object
- Object
- JSON::Schema::Attribute
show all
- Defined in:
- lib/json-schema/validator.rb
Direct Known Subclasses
AdditionalItemsAttribute, AdditionalPropertiesAttribute, AllOfAttribute, AnyOfAttribute, DependenciesAttribute, DependenciesV4Attribute, DisallowAttribute, DivisibleByAttribute, EnumAttribute, ExtendsAttribute, FormatAttribute, ItemsAttribute, MaxDecimalAttribute, MaxItemsAttribute, MaxLengthAttribute, MaxPropertiesAttribute, MaximumAttribute, MaximumInclusiveAttribute, MinItemsAttribute, MinLengthAttribute, MinPropertiesAttribute, MinimumAttribute, MinimumInclusiveAttribute, MultipleOfAttribute, NotAttribute, OneOfAttribute, PatternAttribute, PatternPropertiesAttribute, PropertiesAttribute, PropertiesOptionalAttribute, PropertiesV4Attribute, RefAttribute, RequiredAttribute, TypeAttribute, TypeV4Attribute, UniqueItemsAttribute
Class Method Summary
collapse
-
.build_fragment(fragments) ⇒ Object
-
.validate(current_schema, data, fragments, processor, validator, options = {}) ⇒ Object
-
.validation_error(processor, message, fragments, current_schema, failed_attribute, record_errors) ⇒ Object
-
.validation_errors(validator) ⇒ Object
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
|