I propose a new x-go-valuetype: true attribute that, if true, will make the generator output a primitive type with an ,omitempty attribute and without a pointer.
This particular use case is useful in a lot of cases where an omitted field and an empty value are treated the same:
{
"id": "", // useless
"bio": "", // consider as empty in either cases
}
Either of these fields being *string isn't any more useful.
I propose a new
x-go-valuetype: true
attribute that, if true, will make the generator output a primitive type with an,omitempty
attribute and without a pointer.This particular use case is useful in a lot of cases where an omitted field and an empty value are treated the same:
Either of these fields being
*string
isn't any more useful.