netbox-community / go-netbox

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

IpamPrefixesAvailableIpsRead fails #74

Closed miticotoby closed 3 years ago

miticotoby commented 4 years ago

Environment

Go 1.14.2
NetBox version 2.7.12

Steps to reproduce

Get available IPs from existing prefix `IpamPrefixesAvailableIpsRead`
    p := ipam.NewIpamPrefixesAvailableIpsReadParams()
    p.ID = prefixID
    pp, err := c.Ipam.IpamPrefixesAvailableIpsRead(p, nil) 
    if err != nil {
        return 0, err
    }

Expected behaviour

Should unmarshal to []*model.NestedIPAddress

Observed behaviour

incorrect type
Fails to unmarshal into model.Prefix with error: json: cannot unmarshal array into Go value of type models.Prefix