Wrong type in swagger docs on field count_ipaddresses of interface #3496

Closed
opened 2025-12-29 18:29:31 +01:00 by adam · 2 comments
Owner

Originally created by @mraerino on GitHub (Mar 21, 2020).

Environment

  • Python version: 3.7.5
  • NetBox version: 2.7.10

Steps to Reproduce

  1. Start a fresh netbox installation (e.g. https://netboxdemo.com/)
  2. Go to the swagger docs (e.g. https://netboxdemo.com/api/docs/)
  3. Go to the definition for /dcim/interfaces/{id}/
  4. See that the field count_ipaddresses has type string

Expected Behavior

Since the json from the API response returns an unquoted number, the type needs to be integer.

Observed Behavior

The field has type string which causes deserialisation in some client libraries to fail.
E.g. https://github.com/netbox-community/go-netbox/pull/67

Originally created by @mraerino on GitHub (Mar 21, 2020). ### Environment * Python version: 3.7.5 * NetBox version: 2.7.10 ### Steps to Reproduce 1. Start a fresh netbox installation (e.g. https://netboxdemo.com/) 2. Go to the swagger docs (e.g. https://netboxdemo.com/api/docs/) 3. Go to the definition for `/dcim/interfaces/{id}/` 4. See that the field `count_ipaddresses` has type `string` ### Expected Behavior Since the json from the API response returns an unquoted number, the type needs to be `integer`. ### Observed Behavior The field has type `string` which causes deserialisation in some client libraries to fail. E.g. https://github.com/netbox-community/go-netbox/pull/67
adam closed this issue 2025-12-29 18:29:31 +01:00
Author
Owner

@stefanmcshane commented on GitHub (Mar 25, 2020):

@DanSheps Can we get an update on accepting this?
Blocking use of the Go client library since 2.7 update for us

If not, is there a better process we can use for updating types as it breaks statically typed client libraries

Thanks!

@stefanmcshane commented on GitHub (Mar 25, 2020): @DanSheps Can we get an update on accepting this? Blocking use of the Go client library since 2.7 update for us If not, is there a better process we can use for updating types as it breaks statically typed client libraries Thanks!
Author
Owner

@stefanmcshane commented on GitHub (Apr 4, 2020):

@DanSheps Any update on this?

@stefanmcshane commented on GitHub (Apr 4, 2020): @DanSheps Any update on this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3496