improve non-required values support

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