lib/service_contract/avro/parameter.rb in service_contract-0.0.6 vs lib/service_contract/avro/parameter.rb in service_contract-0.0.7

- old
+ new

@@ -9,9 +9,20 @@ definition.type.type_sym == :record ? definition.type.name : definition.type.type_sym.to_s end + def subtype + item = definition.type.is_a?(::Avro::Schema::ArraySchema) ? + definition.type.items : + nil + return nil unless item + + item.is_a?(::Avro::Schema::PrimitiveSchema) ? + item.type_sym.to_s : + item + end + def default definition.default end def doc \ No newline at end of file