twilio / twilio-cli

Unleash the power of Twilio from your command prompt
MIT License
162 stars 79 forks source link

Outgoing caller ID does not provide the command output #246

Closed evanTheTerribleWarrior closed 3 years ago

evanTheTerribleWarrior commented 3 years ago

Issue Summary

When trying to outgoing-caller-ids:create function, I get wrong output (only warning messages) although the API call itself works - ie.. the call gets generated but there is no code in the output to use.

Steps to Reproduce

  1. Use the command twilio api:core:outgoing-caller-ids:create --friendly-name "My mobile" --phone-number <number>
  2. It seems to give output
    » "sid" is not a valid property name.
    » "phoneNumber" is not a valid property name.
    » "friendlyName" is not a valid property name.

    instead of the code. The call still gets created and received on the phone

Technical details:

shwetha-manvinkurke commented 3 years ago

Hi @evanTheTerribleWarrior I have created a ticket with the Numbers team for internal tracking. But essentially, the problem is that the twilio-cli uses a generated OpenAPI spec to parse API responses that is based on api-defs and sample transactions. In your case, the (POST https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/OutgoingCallerIds.json) lists transactional responses as 201 but actually returns 200.