Converting pathVariable descriptions to string when an object is generated

This commit is contained in:
Abhijit Kane
2020-01-02 19:33:45 +05:30
parent 1dbfd128a7
commit f1a8158bb7

View File

@@ -1556,8 +1556,17 @@ module.exports = {
item.request.url.variables.clear();
item.request.url.variables.assimilate(this.convertPathVariables('param', pathVarArray, reqParams.path,
components, options));
// TODO: There is a bug in Postman that causes these request descriptions
// to be converted as "object Object"
// Making sure description never goes out as an object
// App / Collection transformer fail with the object syntax
if (item.request.url.variables.members && item.request.url.variables.members.length > 0) {
item.request.url.variables.members = _.map(item.request.url.variables.members, (m) => {
if (typeof m.description === 'object' && m.description.content) {
m.description = m.description.content;
}
return m;
});
}
// adding headers to request from reqParam
_.forEach(reqParams.header, (header) => {