MCPcopy Create free account
hub / github.com/goadesign/goa / GetValueKey

Method GetValueKey

expr/types.go:669–674  ·  view source on GitHub ↗

GetValueKey returns the value field name for JSON marshaling. Defaults to "value" if not explicitly set via Meta("oneof:value:field").

()

Source from the content-addressed store, hash-verified

667// GetValueKey returns the value field name for JSON marshaling.
668// Defaults to "value" if not explicitly set via Meta("oneof:value:field").
669func (u *Union) GetValueKey() string {
670 if u.ValueKey != "" {
671 return u.ValueKey
672 }
673 return "value"
674}
675
676// QualifiedTypeName returns the qualified type name for the given data type.
677// The qualified type name includes the name of the type of the elements of

Callers 9

TestUnionGetValueKeyFunction · 0.95
UnionToObjectFunction · 0.80
buildHTTPUnionTypeDataFunction · 0.80
TypeSchemaWithPrefixFunction · 0.80
schemafyMethod · 0.80
TestOneOfCustomKeysFunction · 0.80
buildUnionTypeDataFunction · 0.80
buildViewUnionTypeDataFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestUnionGetValueKeyFunction · 0.76
TestOneOfCustomKeysFunction · 0.64