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
54
55
56
|
# File 'lib/json-schema/validator.rb', line 54
def self.build_fragment(fragments)
"#/#{fragments.join('/')}"
end
|
.validate(current_schema, data, fragments, processor, validator, options = {}) ⇒ Object
51
52
|
# File 'lib/json-schema/validator.rb', line 51
def self.validate(current_schema, data, fragments, processor, validator, options = {})
end
|
.validation_error(processor, message, fragments, current_schema, failed_attribute, record_errors) ⇒ Object
58
59
60
61
62
63
64
65
|
# File 'lib/json-schema/validator.rb', line 58
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
67
68
69
|
# File 'lib/json-schema/validator.rb', line 67
def self.validation_errors(validator)
validator.validation_errors
end
|