116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# File 'lib/avromatic/model/attributes.rb', line 116
def add_avro_fields(generated_methods_module)
register!
if key_avro_schema
check_for_field_conflicts!
begin
define_avro_attributes(key_avro_schema, generated_methods_module,
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, generated_methods_module)
end
|