You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
the Devices.GetDeviceClients call fails where there is a number in the vlan field. it seems like both numbers and strings can be in this field, while the struct is only set for a string
Expected behavior
the call not to fail
Screenshots
2024/07/09 02:41:48 json: cannot unmarshal number into Go struct field ResponseItemDevicesGetDeviceClients.vlan of type string
==============================================================================
~~~ REQUEST ~~~
GET /api/v1/devices/****-****-****/clients?timespan=1800 HTTP/1.1
HOST : api.meraki.com
HEADERS:
Accept: application/json
Authorization: Bearer ********
Content-Type: application/json
User-Agent: go-meraki/1.44.1 **** ****
BODY :
***** NO CONTENT *****
------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS : 200 OK
PROTO : HTTP/2.0
RECEIVED AT : 2024-07-09T04:10:42.316012Z
TIME DURATION: 524.955792ms
HEADERS :
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Type: application/json; charset=utf-8
Date: Tue, 09 Jul 2024 04:10:42 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
X-Request-Id: ****
X-Robots-Tag: none
X-Runtime: 0.286172
X-Xss-Protection: 1; mode=block, 1; mode=block
BODY :
[
{
"id": "****",
....
"vlan": 4,
},
{
"id": "****",
...
"vlan": 4,
}
]
Environment (please complete the following information):
Cisco DNA Center Version and patch:
Go Version: 1.22
SDK version: 3.04
OS Version: Linux
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
stephengroat
changed the title
Devices.GetDeviceClients fails
Devices.GetDeviceClients fails unmarshalling VLAN field
Jul 16, 2024
Prerequisites
Describe the bug
the
Devices.GetDeviceClients
call fails where there is a number in the vlan field. it seems like both numbers and strings can be in this field, while the struct is only set for a stringExpected behavior
the call not to fail
Screenshots
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: