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

Incorrect type for latitude and longitude fields #45

Open
dansimau opened this issue Oct 15, 2021 · 5 comments
Open

Incorrect type for latitude and longitude fields #45

dansimau opened this issue Oct 15, 2021 · 5 comments
Labels
status: help wanted requesting help from the community type: bug bug in the library

Comments

@dansimau
Copy link

According to the docs here:
https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource

The latitude and longitude fields are strings, e.g.:

[...]
      "latitude": "19.720000",
[...]
      "longitude": "-155.090000",

However, the OpenAPI spec specifies them as type number:
https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json

[...]
          "latitude": {
            "description": "The latitude of this phone number's location",
            "nullable": true,
            "type": "number"
          },
[...]
          "longitude": {
            "description": "The longitude of this phone number's location",
            "nullable": true,
            "type": "number"
          },
[...]

I think this might be what's causing errors in the Go SDK, e.g. in twilio-go:

json: cannot unmarshal string into Go struct field ApiV2010AvailablePhoneNumberLocal.available_phone_numbers.latitude of type float32

See: twilio/twilio-go#120

@twilio-dx
Copy link
Collaborator

Ahoy! Thank you for opening your first issue here! If this request is regarding troubleshooting your application, please reach out to the support team via https://support.twilio.com.

@JenniferMah JenniferMah added status: help wanted requesting help from the community type: bug bug in the library labels Oct 20, 2021
@JenniferMah
Copy link
Contributor

JenniferMah commented Oct 20, 2021

Hi @dansimau! Thanks for bringing this to our attention! This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
Internal Reference

@nickdelja
Copy link

Hey @JenniferMah , Do you have any updates on this issue? I see see it is labeled as "help wanted", but it seems like it needs an internal fix.

@KevinZhou1
Copy link

+1 on this issue. I can't use the go sdk without it :(

@javapro108
Copy link

Hello,

Please can you update on this issue or any timeline for the fix?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: bug bug in the library
Projects
None yet
Development

No branches or pull requests

6 participants