postman-collection
Advanced tools
Comparing version 3.6.6 to 3.6.7
var _ = require('../util').lodash, | ||
PropertyBase = require('./property-base').PropertyBase, | ||
PropertyList = require('./property-list').PropertyList, | ||
@@ -229,2 +230,3 @@ E = '', | ||
catch (error) { | ||
// istanbul ignore next | ||
return this.value; | ||
@@ -231,0 +233,0 @@ } |
var _ = require('../util').lodash, | ||
Property = require('./property').Property, | ||
PropertyBase = require('./property-base').PropertyBase, | ||
@@ -47,2 +48,18 @@ FormParam; | ||
return this.value; // can be multiple types, so just return whatever we have instead of being too clever | ||
}, | ||
/** | ||
* Convert the form-param to JSON compatible plain object. | ||
* | ||
* @returns {Object} | ||
*/ | ||
toJSON: function () { | ||
var obj = PropertyBase.toJSON(this); | ||
// remove value from file param because it is non-serializable ReadStream | ||
if (obj.type === 'file') { | ||
_.unset(obj, 'value'); | ||
} | ||
return obj; | ||
} | ||
@@ -49,0 +66,0 @@ }); |
@@ -77,4 +77,6 @@ var _ = require('../util').lodash, | ||
if (!_.isObject(options)) { return; } | ||
// validate type parameter and/or choose default from existing type. | ||
if (!RequestAuth.isValidType(type)) { type = this.type; } | ||
// choose default from existing type if not provided | ||
if (!type) { type = this.type; } | ||
// validate type parameter and return in case type is not valid. | ||
if (!RequestAuth.isValidType(type)) { return; } | ||
@@ -81,0 +83,0 @@ var parameters = this[type]; |
@@ -213,2 +213,16 @@ var _ = require('../util').lodash, | ||
return _.isEmpty(data); // catch all for remaining data modes | ||
}, | ||
/** | ||
* Convert the request body to JSON compatible plain object | ||
* | ||
* @returns {Object} | ||
*/ | ||
toJSON: function () { | ||
var obj = PropertyBase.toJSON(this); | ||
// make sure that file content is removed because it is non-serializable ReadStream | ||
_.unset(obj, 'file.content'); | ||
return obj; | ||
} | ||
@@ -215,0 +229,0 @@ }); |
@@ -14,3 +14,3 @@ { | ||
"type": "array", | ||
"item": { | ||
"items": { | ||
"type": "string", | ||
@@ -17,0 +17,0 @@ "description": "An Url match pattern string" |
@@ -5,3 +5,3 @@ { | ||
"author": "Postman Labs <help@getpostman.com>", | ||
"version": "3.6.6", | ||
"version": "3.6.7", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "postman" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
652839
14392