netbox-community / go-netbox

The official Go API client for Netbox IPAM and DCIM service.
Other
194 stars 144 forks source link

IpamPrefixesList fails unmarshaling #77

Closed cmgreivel closed 3 years ago

cmgreivel commented 4 years ago

Environment

Go 1.13.7 NetBox version 2.8.1

Steps to reproduce

List all prefixes with IpamPrefixesList

    listParm := ipam.NewIpamPrefixesListParams()
    found, err := nb.Ipam.IpamPrefixesList(listParm, nil)

Expected behavior

Should unmarshal successfully

Observed behavior cannot unmarshal number into Go struct field PrefixFamily.results.family.value of type string

Proposed fix Very similar to https://github.com/netbox-community/go-netbox/commit/ea0bfe499b3cc805aeb93674595fcb70f04b2376#diff-702be237a87f80c305c9755b62bc42f9

Change line 24789 in swagger.json to indicate type:"integer"