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 handling of prefixed_collapsible_map parameters #107

Open
maylonpedroso opened this issue Aug 20, 2019 · 3 comments
Open

Incorrect handling of prefixed_collapsible_map parameters #107

maylonpedroso opened this issue Aug 20, 2019 · 3 comments
Labels
status: help wanted requesting help from the community triage queue Issue is in our internal backlog. It's either a bug or a feature enhancement. type: community enhancement feature request not on Twilio's roadmap

Comments

@maylonpedroso
Copy link
Contributor

Issue Summary

Incorrect handling of PREFIXED_COLLAPSIBLE_MAP. The CLI is not decomposing the parameter value in the expected parameters to send in the request.

Steps to Reproduce

Running:

twilio api:lookups:v1:phone-numbers:fetch \
    --phone-number +16502530000 \
    --add-ons payfone_tcpa_compliance \
    --add-ons-data "{\"payfone_tcpa_compliance.RightPartyContactedDate\": \"20160101\"}"

Should make a GET request to:

https://lookups.twilio.com/v1/PhoneNumbers/+16502530000?AddOns=payfone_tcpa_compliance&AddOns.payfone_tcpa_compliance.RightPartyContactedDate=20160101

but is doing:

https://lookups.twilio.com/v1/PhoneNumbers/+16502530000?AddOns=payfone_tcpa_compliance&AddOnsData={%22payfone_tcpa_compliance.RightPartyContactedDate%22:%2220160101%22}

Technical details:

  • twilio-cli Version: 1.4.1 linux-x64
  • Node.js Version: v8.13.0
@thinkingserious thinkingserious added status: help wanted requesting help from the community type: bug bug in the library labels Mar 17, 2020
@thinkingserious
Copy link
Contributor

Hello @maylonpedroso,

Thanks for the heads up!

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.

With best regards,

Elmer

@childish-sambino
Copy link
Contributor

I've looked into this a bit more and unfortunately it's not a simple fix. The closest thing OpenAPI supports to this is style: deepObject for query parameter serialization.

Given that this is the only Twilio API that uses PREFIXED_COLLAPSIBLE_MAP, I'm switching this to a community enhancement. PRs are welcome to add this, but our team is unlikely to build this out.

@childish-sambino childish-sambino added type: community enhancement feature request not on Twilio's roadmap and removed type: bug bug in the library labels Jun 23, 2020
@modest
Copy link

modest commented May 12, 2021

This was in the tutorial for add-ons and has an incorrect example in Twilio's own documentation. I almost gave up on the CLI entirely before finding this post.

https://www.twilio.com/docs/add-ons?code-sample=code-deterministic-tcpa-compliance-with-lookup-and-the-payfone-add-on&code-language=twilio-cli&code-sdk-version=1.x

@shrutiburman shrutiburman added the triage queue Issue is in our internal backlog. It's either a bug or a feature enhancement. label Nov 15, 2022
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 triage queue Issue is in our internal backlog. It's either a bug or a feature enhancement. type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

5 participants