go-netbox icon indicating copy to clipboard operation
go-netbox copied to clipboard

Call to Get Ip-addresses panics on unmarshal error

Open Hakura77 opened this issue 3 years ago • 0 comments
trafficstars

The data structure for an Ip Address AssignedObject (currently map[string]*string) causes a panic on un-marshalling

Currently the return type from the API itself can be a mix of String, Int64 and in the case of the Device field another map

Looking at the swagger.json, this can be fixed by changing the definition there's additional properties to type "object" instead of type "string"

I've done so in a fork and regenerated the client, which fixes the issue, but I'm unsure if this is the policy with issues in the swagger.json generally?

Thanks

Hakura77 avatar Jun 28 '22 00:06 Hakura77