Memory v1, Intelligence v3 and Conversations v2 instances return nil for multi-word fields (camelCase responses read as snake_case)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 45/100
Research direction
Start with the initialize and property readers in lib/twilio-ruby/rest/intelligence/v3/operator.rb and lib/twilio-ruby/rest/conversations/v2/configuration.rb, then compare them with a one-word field that already works, such as id. Check whether the same snake_case lookup pattern appears in the Memory v1 store instance. Reproduce by building an instance from a hash with displayName and statusUrl keys, as the issue shows. Done when display_name and status_url return the camelCase values, which requires either a key-conversion step or per-field camelCase keys, and the existing specs still pass.
Written by the indexing model from the issue text.
Description
Version: twilio-ruby 7.11.3, Ruby 3.4
Description
These APIs return camelCase JSON, for example displayName, statusUrl and conversationGroupingType. The generated instance classes read snake_case keys instead, such as payload['display_name'] and payload['status_url'], and nothing converts the keys. Every multi-word attribute is therefore nil. One-word fields like id, author, status and related work.
Affected, at least:
Twilio::REST::Intelligence::V3::OperatorInstanceTwilio::REST::Intelligence::V3::ConfigurationInstanceTwilio::REST::Conversations::V2::ConfigurationInstanceTwilio::REST::Memory::V1::StoreInstance
Reproduction against a live account
client = Twilio::REST::Client.new(account_sid, auth_token)
client.intelligence.v3.operators.list(limit: 5).each { |o| p [o.id, o.display_name, o.author] }
# => ["intelligence_operator_...", nil, "TWILIO"] (display_name is nil for every operator)
client.conversations.v2.configurations.list(limit: 5).each { |c| p [c.id, c.display_name] }
# => ["conv_configuration_...", nil]
The same request made with curl returns "displayName": "..." for each item.
Reproduction without an account
c = Twilio::REST::Client.new('ACxxx', 'token')
op = Twilio::REST::Intelligence::V3::OperatorInstance.new(c.intelligence.v3, { 'id' => 'intelligence_operator_1', 'displayName' => 'x' })
op.display_name # => nil
cf = Twilio::REST::Conversations::V2::ConfigurationInstance.new(c.conversations.v2, { 'statusUrl' => 'https://...' })
cf.status_url # => nil
Impact
The Conversation Orchestrator quickstart's Ruby example (puts configuration.status_url) prints nothing. Code can't find existing resources by display name, or poll the operation status URL.
Expected
Instances map the API's camelCase keys, either by converting keys or by reading payload['displayName'].
- Dominant language
- Ruby
- Stars
- 1.4k
- Forks
- 472
- Avg merge
- 16h 45m
- Merged PRs (30d)
- 3
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from twilio/twilio-ruby
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
twilio/twilio-ruby#785 ·
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
twilio/twilio-ruby#784 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
twilio/twilio-ruby#802 · 1 comment ·
-
priority: medium status: waiting for feedback type: bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
twilio/twilio-ruby#728 · 2 comments ·
-
priority: medium status: work in progress type: bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
twilio/twilio-ruby#699 · 2 comments ·
All issues in twilio/twilio-ruby
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
-
needs verification
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 13 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
palladius/rails8-app-on-gcp#244 ·
Maintainers usually reply within 1 day
-
MAC addresses issuesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
rezoleo/lea5#583 · 2 comments ·
Maintainers usually reply within 3 days