Class: Chronicle::Schema::Validation::BaseContract

Inherits:
Dry::Validation::Contract
  • Object
show all
Defined in:
lib/chronicle/schema/validation/base_contract.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#type_nameObject

I think this doesn’t work for nested objects because we don’t enumerate all the properties and rely on the edgevalidator to do the validation. Commenting out for now. config.validate_keys = true



14
15
16
# File 'lib/chronicle/schema/validation/base_contract.rb', line 14

def type_name
  @type_name
end

Class Method Details

.type(type_name) ⇒ Object



16
17
18
# File 'lib/chronicle/schema/validation/base_contract.rb', line 16

def self.type(type_name)
  @type_name = type_name
end