mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Disabled body proning for requests with method like GET, HEAD etc.
This commit is contained in:
@@ -1906,7 +1906,7 @@ module.exports = {
|
||||
|
||||
updateOptions = {
|
||||
mode: rDataMode,
|
||||
raw: JSON.stringify(bodyData, null, 4)
|
||||
raw: JSON.stringify(bodyData, null, options.indentCharacter)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2400,6 +2400,10 @@ 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';
|
||||
}))) {
|
||||
|
||||
Reference in New Issue
Block a user