googlemaps / google-maps-services-go

Go client library for Google Maps API Web Services
https://pkg.go.dev/googlemaps.github.io/maps
Apache License 2.0
737 stars 214 forks source link

Client.PlaceDetails fails for ID ChIJUXcBoFD-nkcR3s74TnqlDHM #281

Closed htwais closed 1 year ago

htwais commented 1 year ago

in v1.4.0 it fails with json: cannot unmarshal array into Go struct field PlaceDetailsResult.result.secondary_opening_hours of type maps.OpeningHours

commit d757700d4eb9a15a3faa7af90c61d8270e2f8333 added SecondaryOpeningHours as an object: SecondaryOpeningHours OpeningHours json:"secondary_opening_hours,omitempty"

it should be an array imho SecondaryOpeningHours []*OpeningHours json:"secondary_opening_hours,omitempty"

In ID ChIJUXcBoFD-nkcR3s74TnqlDHM it is an array: "secondary_opening_hours" : [{...}] and the comment says so too: "SecondaryOpeningHours may contain an array of entries ..."

It works in v1.3.2

wangela commented 1 year ago

If you would like to upvote the priority of this issue, please comment below or react with :+1: so we can see what is popular when we triage.

@htwais Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

wexder commented 1 year ago

This basically broke our production. Can we please prioritize fix?

abhishp commented 1 year ago

Any updates on this?

cedricf commented 1 year ago

Is there any ETA on when this will be fixed? There are many place_ids (e.g. ChIJZ8MeRRouTI8REZAMtusUH3I, ChIJs_C9pI7rt4kRyaoLRgpt2Hs, ChIJp10yB9gJx0cRDMqmn-czMF4, ...) where this fails which renders this version of the API useless. Is there a workaround other than reverting the version?

googlemaps-bot commented 1 year ago

:tada: This issue has been resolved in version 1.5.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: