Module: Avromatic::Model::Attributes::ClassMethods
- Defined in:
- lib/avromatic/model/attributes.rb
Instance Method Summary collapse
Instance Method Details
#add_avro_fields ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/avromatic/model/attributes.rb', line 114 def add_avro_fields # models are registered in Avromatic.nested_models at this point to # ensure that they are available as fields for recursive models. register! if key_avro_schema check_for_field_conflicts! begin define_avro_attributes(key_avro_schema, allow_optional: config.allow_optional_key_fields) rescue OptionalFieldError => ex raise "Optional field '#{ex.field.name}' not allowed in key schema." end end define_avro_attributes(avro_schema) end |