meraki / dashboard-api-go

Dashboard API for Golang
MIT License
19 stars 7 forks source link

Error on GetOrganizationDevicesStatuses unmarshal in OrganizationApi #18

Open stephengroat opened 11 months ago

stephengroat commented 11 months ago

Describe the bug json: cannot unmarshal object into Go struct field GetOrganizationDevicesStatuses200ResponseInnerComponents.components.powerSupplies of type string

currently marked as type []string in API

see https://github.com/meraki/openapi/issues/50

To Reproduce Steps to reproduce the behavior:

  1. Example Code
statuses, _, err = client.OrganizationsApi.GetOrganizationDevicesStatuses(ctx, orgID).Execute()
if err != nil {
     log.Fatal(err)
}

Expected behavior No Error

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

stephengroat-dd commented 9 months ago

Hoping someone can bump https://github.com/meraki/openapi/issues/50 as additional evidence has been provided but no changes have been made

iamdexterpark commented 9 months ago

Hello @stephengroat-dd,

I genuinely appreciate both you and @jyoung15 for taking the time to document this issue and share client-side solutions meticulously.



We autogenerate this HTTP client from the official OpenAPI specification to ensure consistency and scalability. With that in mind, we should continue to advocate for a correction on the upstream OpenAPI spec.

It can be frustrating, and I completely understand the need for immediate fixes. However, manual adjustments on the client might not be sustainable in the long run and could require manual intervention to preserve in future releases.

Sorry for the inconvenience. I appreciate your contributions here and will monitor progress on the upstream repo. I've changed this to a bug for now.

stephengroat commented 7 months ago

Any movement on this? https://github.com/meraki/openapi/issues/50 was last commented in Sept, still not seeing any movement. tried to ping in https://github.com/meraki/openapi/issues/50#issuecomment-1843344198

TKIPisalegacycipher commented 3 months ago

Hi @stephengroat, as discussed in https://github.com/meraki/openapi/issues/50 there is a better operation to use for device IP addresses. The existing statuses operation might be marked as deprecated in the near future. Are you having any issues using the replacement operations?

stephengroat commented 3 months ago

Converted the existing calls to GetOrganizationDevicesUplinksAddressesByDevice, which seems to be working