diff --git a/src/ApiClient.js b/src/ApiClient.js index f338cb30..56276e9b 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -688,6 +688,11 @@ } else if (Array.isArray(type)) { // for array type like: ['String'] var itemType = type[0]; + if (typeof(data) === 'string') { + return [data].map(function(item) { + return exports.convertToType(item, itemType); + }); + } return data.map(function(item) { return exports.convertToType(item, itemType); });