Skip to content

Commit 50b7b06

Browse files
committed
Merge branch 'develop' into feat/deprecatedOption
2 parents e85b374 + 044880a commit 50b7b06

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# OpenAPI-Postman Changelog
22

3+
#### v4.4.0 (November 29, 2022)
4+
* Fixed issue where collection folder name for paths were having extra spaces.
5+
* Fixed issue where pipelines were failing for certain node version.
6+
37
#### v4.3.0 (October 17, 2022)
48
* Fixed issue with nullable keywords getting validated incorrectly.
59

lib/schemaUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ module.exports = {
10261026
// only return a Postman folder if this folder has>1 children in its subtree
10271027
// otherwise we can end up with 10 levels of folders with 1 request in the end
10281028
itemGroup = new sdk.ItemGroup({
1029-
name: utils.insertSpacesInName(resource.name)
1029+
name: resource.name
10301030
// TODO: have to add auth here (but first, auth to be put into the openapi tree)
10311031
});
10321032
// If a folder has only one child which is a folder then we collapsed the child folder

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-to-postmanv2",
3-
"version": "4.3.0",
3+
"version": "4.4.0",
44
"description": "Convert a given OpenAPI specification to Postman Collection v2.0",
55
"homepage": "https://github.com/postmanlabs/openapi-to-postman",
66
"bugs": "https://github.com/postmanlabs/openapi-to-postman/issues",

test/unit/base.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,22 @@ describe('CONVERT FUNCTION TESTS ', function() {
12861286
});
12871287
});
12881288

1289+
it('Should generate collection where folder name doesn\'t contain spaces when ' +
1290+
'not present in operation path', function (done) {
1291+
var openapi = fs.readFileSync(testSpec, 'utf8');
1292+
Converter.convert({ type: 'string', data: openapi }, { schemaFaker: true }, (err, conversionResult) => {
1293+
expect(err).to.be.null;
1294+
expect(conversionResult.result).to.equal(true);
1295+
expect(conversionResult.output.length).to.equal(1);
1296+
expect(conversionResult.output[0].type).to.equal('collection');
1297+
expect(conversionResult.output[0].data).to.have.property('info');
1298+
expect(conversionResult.output[0].data).to.have.property('item');
1299+
expect(conversionResult.output[0].data.item.length).to.equal(2);
1300+
expect(_.map(conversionResult.output[0].data.item, 'name')).to.include.members(['pets', 'pet/{petId}']);
1301+
done();
1302+
});
1303+
});
1304+
12891305
it('Should convert and include deprecated operations when option is not present' +
12901306
'- has only one op and is deprecated', function () {
12911307
const fileData = fs.readFileSync(onlyOneOperationDeprecated, 'utf8');

0 commit comments

Comments
 (0)