Class: JSON::Schema::PropertiesV4Attribute

Inherits:
PropertiesAttribute show all
Defined in:
lib/json-schema/attributes/properties_v4.rb

Constant Summary

Constants inherited from Attribute

Attribute::TYPE_CLASS_MAPPINGS

Class Method Summary collapse

Methods inherited from PropertiesAttribute

validate

Methods inherited from Attribute

build_fragment, data_valid_for_type?, type_of_data, validate, validation_error, validation_errors

Class Method Details

.required?(schema, options) ⇒ Boolean

draft4 relies on its own RequiredAttribute validation at a higher level, rather than as an attribute of individual properties.

Returns:

  • (Boolean)


8
9
10
# File 'lib/json-schema/attributes/properties_v4.rb', line 8

def self.required?(schema, options)
  options[:allPropertiesRequired] == true
end