twilio / twilio/twilio-java

Undocumented breaking change in `com.twilio.rest.verify.v2.service.Verification#getSendCodeAttempts()`

Open Beginner friendly
#976 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
527
Forks
453
Avg merge
10h 59m
Merged PRs (30d)
6

Description

Somewhere between version 10.x and 13.x of twilio-java, the return type of com.twilio.rest.verify.v2.service.Verification#getSendCodeAttempts() changed from List<Map<String, Object>> to just List<Object>, but the change isn't noted anywhere in the upgrade guide. It appears that the "shape" of the returned list element is the same, and casting it to a Map<String, Object> is all that's needed.

There are several things that I think could be addressed here:

  1. The main focus of this ticket: it's probably worth calling out this change somewhere in the upgrade guide.
  2. Could getSendCodeAttempts return a more specific object type?
  3. The Javadoc for twilio-java from 11.x and up does not include any of the getter methods for Verification (and numerous other classes). It looks like the last version for which getter documentation was present is 10.9.2. I'm guessing that doc generation for 11+ is happening before some code generation step that would actually add the getters.
  4. On a related note, the published source jars for at least 13.0.0 (and I strongly suspect other versions) do not match the published bytecode.
  5. For 10.9.2 (and probably other versions), trying to actually view the docs leads to an "access denied" error.

I'm happy to open separate issues for all of these if that's helpful to you; I present them here as a single issue because they're all part of the same "trying to figure out what changed and when" story.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with UPGRADE.md and compare the documented versions around the change to Verification#getSendCodeAttempts(). Focus first on recording the return-type change from List<Map<String, Object>> to List; completion means the upgrade guide clearly calls out the compatibility impact. The Javadoc, generated-source, and access issues are additional concerns that may need separate investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.