mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Fixed issue where disableBodyPruning option was not set to true for requests like GET, HEAD etc. with no request body
This commit is contained in:
@@ -2454,9 +2454,6 @@ module.exports = {
|
||||
pmBody = this.convertToPmBody(reqBody, REQUEST_TYPE.ROOT, components, options, schemaCache);
|
||||
item.request.body = pmBody.body;
|
||||
|
||||
// Following is added to make sure body pruning for request methods like GET, HEAD etc is disabled'.
|
||||
item.protocolProfileBehavior = { disableBodyPruning: true };
|
||||
|
||||
if (!options.keepImplicitHeaders || (!_.find(reqParams.header, (h) => {
|
||||
return _.toLower(_.get(h, 'name')) === 'content-type';
|
||||
}))) {
|
||||
@@ -2568,6 +2565,13 @@ module.exports = {
|
||||
if (!_.isEmpty(acceptHeader) && !item.request.headers.has('accept')) {
|
||||
item.request.addHeader(acceptHeader);
|
||||
}
|
||||
|
||||
/**
|
||||
* Following is added to make sure body pruning for request methods like GET, HEAD etc is disabled'.
|
||||
* https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md
|
||||
*/
|
||||
item.protocolProfileBehavior = { disableBodyPruning: true };
|
||||
|
||||
return item;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user