forked from loafle/openapi-generator-original
[go]: fix anyOf compilation error (#10431)
This commit is contained in:
parent
a939676c0d
commit
61852a072a
@ -20,7 +20,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
|
|||||||
{{#-first}}
|
{{#-first}}
|
||||||
// use discriminator value to speed up the lookup
|
// use discriminator value to speed up the lookup
|
||||||
var jsonDict map[string]interface{}
|
var jsonDict map[string]interface{}
|
||||||
err := json.Unmarshal(data, &jsonDict)
|
err = json.Unmarshal(data, &jsonDict)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.")
|
return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user