Skip to content

Commit 2c31495

Browse files
committed
Merge branch 'develop' of github.com:postmanlabs/openapi-to-postman into feature/fix-non-string-urls
2 parents 5e1b16e + 044880a commit 2c31495

File tree

7 files changed

+26
-5
lines changed

7 files changed

+26
-5
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ node_js:
44
- "8"
55
- "10"
66
- "12"
7-
- "lts/*"
7+
- "14"
8+
- "16"

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
@@ -995,7 +995,7 @@ module.exports = {
995995
// only return a Postman folder if this folder has>1 children in its subtree
996996
// otherwise we can end up with 10 levels of folders with 1 request in the end
997997
itemGroup = new sdk.ItemGroup({
998-
name: utils.insertSpacesInName(resource.name)
998+
name: resource.name
999999
// TODO: have to add auth here (but first, auth to be put into the openapi tree)
10001000
});
10011001
// 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/system/travis-yml.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('travis.yml', function () {
2525
describe('strucure', function () {
2626
it('language must be set to node', function () {
2727
expect(travisYAML.language).to.be('node_js');
28-
expect(travisYAML.node_js).to.eql(['8', '10', '12', 'lts/*']);
28+
expect(travisYAML.node_js).to.eql(['8', '10', '12', '14', '16']);
2929
});
3030
});
3131
});

test/unit/base.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,6 +1275,22 @@ describe('CONVERT FUNCTION TESTS ', function() {
12751275
done();
12761276
});
12771277
});
1278+
1279+
it('Should generate collection where folder name doesn\'t contain spaces when ' +
1280+
'not present in operation path', function (done) {
1281+
var openapi = fs.readFileSync(testSpec, 'utf8');
1282+
Converter.convert({ type: 'string', data: openapi }, { schemaFaker: true }, (err, conversionResult) => {
1283+
expect(err).to.be.null;
1284+
expect(conversionResult.result).to.equal(true);
1285+
expect(conversionResult.output.length).to.equal(1);
1286+
expect(conversionResult.output[0].type).to.equal('collection');
1287+
expect(conversionResult.output[0].data).to.have.property('info');
1288+
expect(conversionResult.output[0].data).to.have.property('item');
1289+
expect(conversionResult.output[0].data.item.length).to.equal(2);
1290+
expect(_.map(conversionResult.output[0].data.item, 'name')).to.include.members(['pets', 'pet/{petId}']);
1291+
done();
1292+
});
1293+
});
12781294
});
12791295

12801296
describe('Converting swagger 2.0 files', function() {

0 commit comments

Comments
 (0)