Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Device Appliance Performance is now returning float (not int) #42

Open
DanH-Semplicity opened this issue Aug 27, 2024 · 0 comments · May be fixed by #43
Open

Get Device Appliance Performance is now returning float (not int) #42

DanH-Semplicity opened this issue Aug 27, 2024 · 0 comments · May be fixed by #43

Comments

@DanH-Semplicity
Copy link

Prerequisites

  • [x ] Have you tested the operation in the API directly?
  • [ x] Do you have the latest SDK version?
  • [? ] Review compability matrix

Describe the bug
When using dashboard-api-go to call the method client.Appliance.GetDeviceAppliancePerformance(serial) I am getting the following error response. Error when calling `ApplianceApi.GetDeviceAppliancePerformance``: json: cannot unmarshal number 11.0 into Go struct field ResponseApplianceGetDeviceAppliancePerformance.perfScore of type int

I attempted calling meraki api directly with curl and I do get a float response (and not an int)
https://developer.cisco.com/meraki/api-v1/get-device-appliance-performance/

The code seems to try to unmarshal a float into an int.
https://github.com/meraki/dashboard-api-go/blob/main/sdk/appliance.go#L2616C1-L2640C2
and
https://github.com/meraki/dashboard-api-go/blob/main/sdk/appliance.go#L89

Expected behavior
The api call should not error, a float value should be returned.

Screenshots

Environment (please complete the following information):

  • Cisco DNA Center Version and patch: - Meraki API
  • Go Version: go version go1.22.5 darwin/amd64
  • SDK version: go get github.com/meraki/dashboard-api-go/client
  • OS Version: Mac Sonoma

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant