Class: ArchivesSpaceSubTypeAttribute
- Inherits:
-
JSON::Schema::TypeAttribute
- Object
- JSON::Schema::TypeAttribute
- ArchivesSpaceSubTypeAttribute
- Defined in:
- common/archivesspace_json_schema.rb
Class Method Summary collapse
Class Method Details
.validate(current_schema, data, fragments, validator, options = {}) ⇒ Object
122 123 124 125 126 127 |
# File 'common/archivesspace_json_schema.rb', line 122 def self.validate(current_schema, data, fragments, validator, = {}) if data.is_a?(Hash) && !data.has_key?('ref') = "ERROR: The property '#{build_fragment(fragments)}' did not contain a required property of 'ref'" validation_error(, fragments, current_schema, self, [:record_errors]) end end |