netbox-community / go-netbox

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

Cannot retrieve Childdevice #30

Closed hensoko closed 4 years ago

hensoko commented 6 years ago

Hey,

I just tested go-netbox and had a problem retrieving devices that act as child device. The definition of swagger.json says that parent_device has to be a string but the netbox api returns a json object like:

"parent_device": {
    "id": 123,
    "url": "https://netbox-url/api/dcim/devices/123/",
    "name": "parent device name",
    "display_name": "parent device display name",
    "device_bay": {
        "id": 1,
        "url": "https://netbox-url/api/dcim/device-bays/1/",
        "name": "device bay name"
    }
}

Regards

hensoko