netbox-community / go-netbox

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

The client is not compliant with netbox latest API #40

Closed fcgravalos closed 4 years ago

fcgravalos commented 5 years ago

Just trying to create a simple VLAN throws json unmarshalling issues:

json: cannot unmarshal object into Go struct field WritableVLAN.status of type int64

Just curl against the API is pretty clear that the status field should be either struct or map[string]inerface{}

 "status": {
    "value": 1,
    "label": "Active"
  },

This is a major bug guys...

awlx commented 4 years ago

Fixed via #47