diff --git a/src/services/api-schema/twilio-converter.js b/src/services/api-schema/twilio-converter.js index 3efc5ae8..b3ab1713 100644 --- a/src/services/api-schema/twilio-converter.js +++ b/src/services/api-schema/twilio-converter.js @@ -18,7 +18,11 @@ class TwilioSchemaConverter extends JsonSchemaConverter { propValue = this.convertSchema(propSchema, propValue); } - return { propName: camelCase(propName), propValue }; + if (propSchema) { + propName = camelCase(propName); + } + + return { propName, propValue }; } convertString(schema, value) { diff --git a/test/services/api-schema.test.js b/test/services/api-schema.test.js index 57d4dd08..f2f1559b 100644 --- a/test/services/api-schema.test.js +++ b/test/services/api-schema.test.js @@ -37,7 +37,7 @@ describe('services', () => { dateCreated: new Date('September 15, 2008 15:53 GMT+0500'), dateUpdated: new Date('September 15, 2008 15:53 GMT+0500'), messageType: ['not', 'a', 'message'], - freeFormObj: { firstKey: 'first_value', secondKey: 'second_value' }, + freeFormObj: { first_key: 'first_value', second_key: 'second_value' }, someUri: '/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json' };