improve non-required values support

Remove omit-empty for named struct, and take required property in account
when generating the options struct fields.