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.
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-matchIf 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: https://github.com/twilio/twilio-node/issues/344#issuecomment-390877385
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.