GetTypeKey returns the discriminator field name for JSON marshaling. Defaults to "type" if not explicitly set via Meta("oneof:type:field").
()
| 658 | // GetTypeKey returns the discriminator field name for JSON marshaling. |
| 659 | // Defaults to "type" if not explicitly set via Meta("oneof:type:field"). |
| 660 | func (u *Union) GetTypeKey() string { |
| 661 | if u.TypeKey != "" { |
| 662 | return u.TypeKey |
| 663 | } |
| 664 | return "type" |
| 665 | } |
| 666 | |
| 667 | // GetValueKey returns the value field name for JSON marshaling. |
| 668 | // Defaults to "value" if not explicitly set via Meta("oneof:value:field"). |
no outgoing calls