Currently we correctly skip serialization of properties with None values if we've synthesized the Option<T> wrapper because the property is not required. However, when the property is not required and it's already typed Option<T> because it's defined as "type": ["T", "null"], we were not skipping serialization when its value is None. Do so.
Also add a test for required/optional arrays, and extend the OptionType test to cover required fields.
Currently we correctly skip serialization of properties with
None
values if we've synthesized theOption<T>
wrapper because the property is not required. However, when the property is not required and it's already typedOption<T>
because it's defined as"type": ["T", "null"]
, we were not skipping serialization when its value isNone
. Do so.Also add a test for required/optional arrays, and extend the
OptionType
test to cover required fields.