You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to see if docs folks can tweak that, or at least add a note about helper libraries changing property casing. Obviously most devs will clock this right away, but still, it adds unnecessary cognitive overhead when referring to API docs.
Happy to open another issue for that, but this repo is probably not the place for that work to be tracked anyway.
The text was updated successfully, but these errors were encountered:
This library converts snake_case API responses to camelCase, e.g.:
https://github.com/twilio/twilio-node/blob/a23ee16/src/rest/lookups/v2/phoneNumber.ts#L218-L232
This is only occurring at the top level, but not within nested objects, e.g.
lineTypeIntelligence
/line_type_intelligence
:https://www.twilio.com/docs/lookup/v2-api/identity-match
If the intent is to continue hardcoding these case conversions, a fix (shown only for one possible nested object) might look something like this:
or
Alternately, rather than hardcoding case conversions, a library (e.g. https://www.npmjs.com/package/case-anything ➝ https://github.com/mesqueeb/case-anything) could be used
The docs (e.g. https://www.twilio.com/docs/lookup/v2-api/identity-match) are a little confusing, they always show snake_case, even when the selected library is "NODE.JS". I think that's a known issue, I found a mention of it from May 2018: #344 (comment)
Would be nice to see if docs folks can tweak that, or at least add a note about helper libraries changing property casing. Obviously most devs will clock this right away, but still, it adds unnecessary cognitive overhead when referring to API docs.
Happy to open another issue for that, but this repo is probably not the place for that work to be tracked anyway.
The text was updated successfully, but these errors were encountered: