MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / Set

Method Set

internal/test/issues/issue193/issue.gen.go:29–34  ·  view source on GitHub ↗

Setter for additional properties for Person

(fieldName string, value interface{})

Source from the content-addressed store, hash-verified

27
28// Setter for additional properties for Person
29func (a *Person) Set(fieldName string, value interface{}) {
30 if a.AdditionalProperties == nil {
31 a.AdditionalProperties = make(map[string]interface{})
32 }
33 a.AdditionalProperties[fieldName] = value
34}
35
36// Override default JSON handling for Person to handle AdditionalProperties
37func (a *Person) UnmarshalJSON(b []byte) error {

Calls

no outgoing calls

Tested by 3

TestIssue518Function · 0.36
TestErrorHandlerFuncFunction · 0.36