From 06d5027a43817cfe97f82973bc8daa459cff7d38 Mon Sep 17 00:00:00 2001 From: Ankit Saini Date: Mon, 4 Sep 2023 14:46:07 +0530 Subject: [PATCH 01/10] Add description for path variables if present --- libV2/utils.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libV2/utils.js b/libV2/utils.js index 00e952bd..101478d1 100644 --- a/libV2/utils.js +++ b/libV2/utils.js @@ -66,6 +66,15 @@ const sdk = require('postman-collection'), }); requestItem.request.url.variables.assimilate(pathParams); + _.forEach(pathParams, (param) => { + if (param.description) { + const item = requestItem.request.url.variables.one(param.key); + if (!_.isEmpty(item)) { + item.description = param.description; + } + } + }); + requestItem.request.auth = auth; _.forEach(responses, (response) => { From c9849192c0282242e48c1eb398034c1fccc7159f Mon Sep 17 00:00:00 2001 From: Ankit Saini Date: Thu, 7 Sep 2023 17:11:13 +0530 Subject: [PATCH 02/10] Add unit test --- .../path_params_with_description.json | 55 +++++++++++++++++++ test/unit/convertV2.test.js | 11 ++++ 2 files changed, 66 insertions(+) create mode 100644 test/data/valid_openapi/path_params_with_description.json diff --git a/test/data/valid_openapi/path_params_with_description.json b/test/data/valid_openapi/path_params_with_description.json new file mode 100644 index 00000000..1b2509de --- /dev/null +++ b/test/data/valid_openapi/path_params_with_description.json @@ -0,0 +1,55 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore", + "license": { + "name": "MIT" + } + }, + "servers": [ + { + "url": "http://petstore.swagger.io/v1" + } + ], + "paths": { + "/pets/{petId}": { + "get": { + "summary": "List all pets", + "operationId": "listPets", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "Id of pet", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "headers": { + "responseHeader1": { + "description":"Description of responseHeader1", + "required": true, + "schema": { + "type": "integer" + } + }, + "responseHeader2": { + "description":"Description of responseHeader2", + "schema": { + "type": "integer" + } + } + } + } + } + } + } + } +} diff --git a/test/unit/convertV2.test.js b/test/unit/convertV2.test.js index a6ed9531..3a5d0556 100644 --- a/test/unit/convertV2.test.js +++ b/test/unit/convertV2.test.js @@ -30,6 +30,7 @@ const expect = require('chai').expect, examplesOutsideSchema = path.join(__dirname, VALID_OPENAPI_PATH + '/examples_outside_schema.json'), exampleOutsideSchema = path.join(__dirname, VALID_OPENAPI_PATH + '/example_outside_schema.json'), descriptionInBodyParams = path.join(__dirname, VALID_OPENAPI_PATH + '/description_in_body_params.json'), + descriptionInPathParams = path.join(__dirname, VALID_OPENAPI_PATH + '/path_params_with_description.json'), zeroDefaultValueSpec = path.join(__dirname, VALID_OPENAPI_PATH + '/zero_in_default_value.json'), requiredInParams = path.join(__dirname, VALID_OPENAPI_PATH, '/required_in_parameters.json'), multipleRefs = path.join(__dirname, VALID_OPENAPI_PATH, '/multiple_refs.json'), @@ -552,6 +553,16 @@ describe('The convert v2 Function', function() { }); }); + it('should add description in path params', function (done) { + var openapi = fs.readFileSync(descriptionInPathParams, 'utf-8'); + Converter.convertV2({ type: 'string', data: openapi }, { schemaFaker: true }, (err, conversionResult) => { + let description = conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description; + expect(err).to.be.null; + expect(description).to.equal('(Required) Id of pet'); + done(); + }); + }); + it('Should create collection from folder having one root file for browser', function(done) { let folderPath = path.join(__dirname, '../data/petstore separate yaml'), files = [], From 1f7e03199ed3dffd12222c357270be1a49169fc6 Mon Sep 17 00:00:00 2001 From: Jatin Parekh Date: Mon, 11 Sep 2023 18:29:24 +0530 Subject: [PATCH 03/10] Copy path variable description to generated collection --- package.json | 2 +- test/data/valid_openapi/description-test.yaml | 37 +++++++++++++++++++ test/unit/convertV2.test.js | 19 ++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 test/data/valid_openapi/description-test.yaml diff --git a/package.json b/package.json index 03d3f4c9..83ac7e17 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "object-hash": "3.0.0", "graphlib": "2.1.8", "path-browserify": "1.0.1", - "postman-collection": "4.1.5", + "postman-collection": "4.2.1", "swagger2openapi": "7.0.8", "traverse": "0.6.6", "yaml": "1.10.2" diff --git a/test/data/valid_openapi/description-test.yaml b/test/data/valid_openapi/description-test.yaml new file mode 100644 index 00000000..5748d48f --- /dev/null +++ b/test/data/valid_openapi/description-test.yaml @@ -0,0 +1,37 @@ +openapi: "3.0.0" +info: + version: "1.0.0" + title: "Sample API" + description: Buy or rent spacecrafts + +paths: + /space/{spacecraftId}: + get: + parameters: + - name: spacecraftId + description: PATH_PARAM_DESCRIPTION + in: path + required: true + schema: + type: string + - name: limit + in: query + description: QUERY_PARAM_DESCRIPTION + required: false + schema: + type: integer + format: int32 + - name: page + in: header + description: "HEADER_DESCRIPTION_NOT_PRESENT" + required: false + schema: + type: string + summary: Read a spacecraft + responses: + "201": + description: The spacecraft corresponding to the provided `spacecraftId` + content: + application/json: + schema: + type: string diff --git a/test/unit/convertV2.test.js b/test/unit/convertV2.test.js index 3a5d0556..f44d088b 100644 --- a/test/unit/convertV2.test.js +++ b/test/unit/convertV2.test.js @@ -54,6 +54,7 @@ const expect = require('chai').expect, path.join(__dirname, VALID_OPENAPI_PATH, '/query_param_with_enum_resolve_as_example.json'), formDataParamDescription = path.join(__dirname, VALID_OPENAPI_PATH, '/form_data_param_description.yaml'), allHTTPMethodsSpec = path.join(__dirname, VALID_OPENAPI_PATH, '/all-http-methods.yaml'), + descriptionTestSpec = path.join(__dirname, VALID_OPENAPI_PATH, '/description-test.yaml'), invalidNullInfo = path.join(__dirname, INVALID_OPENAPI_PATH, '/invalid-null-info.json'), invalidNullInfoTitle = path.join(__dirname, INVALID_OPENAPI_PATH, '/invalid-info-null-title.json'), invalidNullInfoVersion = path.join(__dirname, INVALID_OPENAPI_PATH, '/invalid-info-null-version.json'), @@ -1170,6 +1171,24 @@ describe('The convert v2 Function', function() { }); }); + it('description test', function(done) { + var openapi = fs.readFileSync(descriptionTestSpec, 'utf8'); + + Converter.convertV2({ type: 'string', data: openapi }, + {}, (err, conversionResult) => { + expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[0].description.content).to.equal( + 'QUERY PARAM DESCRIPTION' + ); + expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description).to.equal( + 'PATH PARAM DESCRIPTION' + ); + expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.header[0].description).to.equal( + 'HEADER PARAM DESCRIPTION' + ); + done(); + }); + }); + it('Should have disableBodyPruning option for protocolProfileBehavior set to true for all types of request' + allHTTPMethodsSpec, function (done) { var openapi = fs.readFileSync(allHTTPMethodsSpec, 'utf8'); From e12d87979e4dc7ad3c4d0d5304a775179b3bb35c Mon Sep 17 00:00:00 2001 From: Jatin Parekh Date: Mon, 11 Sep 2023 18:51:14 +0530 Subject: [PATCH 04/10] Add cases for testing required/optional properties --- test/data/valid_openapi/description-test.yaml | 26 ++++++++++++++++--- test/unit/convertV2.test.js | 17 +++++++++--- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/test/data/valid_openapi/description-test.yaml b/test/data/valid_openapi/description-test.yaml index 5748d48f..434393fd 100644 --- a/test/data/valid_openapi/description-test.yaml +++ b/test/data/valid_openapi/description-test.yaml @@ -9,24 +9,44 @@ paths: get: parameters: - name: spacecraftId - description: PATH_PARAM_DESCRIPTION + description: "Required spacecraftId path param" in: path required: true schema: type: string + - name: pathParamOptional + description: "Path param optional description" + in: path + required: false + schema: + type: string - name: limit in: query - description: QUERY_PARAM_DESCRIPTION + description: "QUERY PARAM DESCRIPTION" + required: true + schema: + type: integer + format: int32 + - name: optionalQueryParam + in: query + description: "QUERY PARAM Optional" required: false schema: type: integer format: int32 - name: page in: header - description: "HEADER_DESCRIPTION_NOT_PRESENT" + description: "HEADER PARAM DESCRIPTION" + required: true + schema: + type: string + - name: offset + in: header + description: "HEADER PARAM Optional" required: false schema: type: string + summary: Read a spacecraft responses: "201": diff --git a/test/unit/convertV2.test.js b/test/unit/convertV2.test.js index f44d088b..7736fc37 100644 --- a/test/unit/convertV2.test.js +++ b/test/unit/convertV2.test.js @@ -1177,13 +1177,22 @@ describe('The convert v2 Function', function() { Converter.convertV2({ type: 'string', data: openapi }, {}, (err, conversionResult) => { expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[0].description.content).to.equal( - 'QUERY PARAM DESCRIPTION' + '(Required) QUERY PARAM DESCRIPTION' + ); + expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[1].description.content).to.equal( + 'QUERY PARAM Optional' ); expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description).to.equal( - 'PATH PARAM DESCRIPTION' + '(Required) Required spacecraftId path param' + ); + expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[1].description).to.equal( + 'Path param optional description' + ); + expect(conversionResult.output[0].data.item[0].item[0].item[0].request.header[0].description.content).to.equal( + '(Required) HEADER PARAM DESCRIPTION' ); - expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.header[0].description).to.equal( - 'HEADER PARAM DESCRIPTION' + expect(conversionResult.output[0].data.item[0].item[0].item[0].request.header[1].description.content).to.equal( + 'HEADER PARAM Optional' ); done(); }); From 8c91ad56463be25ea36b4792469c43d3fd71437b Mon Sep 17 00:00:00 2001 From: Jatin Parekh Date: Mon, 11 Sep 2023 19:00:15 +0530 Subject: [PATCH 05/10] Update lock file --- package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index b7b20f6e..d3a147aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "oas-resolver-browser": "2.5.6", "object-hash": "3.0.0", "path-browserify": "1.0.1", - "postman-collection": "4.1.5", + "postman-collection": "4.2.1", "swagger2openapi": "7.0.8", "traverse": "0.6.6", "yaml": "1.10.2" @@ -4253,9 +4253,9 @@ } }, "node_modules/postman-collection": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.1.5.tgz", - "integrity": "sha512-BY3NfP7EYExZG5ER9P82r0ZRc17z88WZAzn121EpWC8FM3HYtFwWJpXOsZk+2MKFn3agCq4JPRhnWw3G6XBXgw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.2.1.tgz", + "integrity": "sha512-DFLt3/yu8+ldtOTIzmBUctoupKJBOVK4NZO0t68K2lIir9smQg7OdQTBjOXYy+PDh7u0pSDvD66tm93eBHEPHA==", "dependencies": { "@faker-js/faker": "5.5.3", "file-type": "3.9.0", @@ -4266,7 +4266,7 @@ "mime-format": "2.0.1", "mime-types": "2.1.35", "postman-url-encoder": "3.0.5", - "semver": "7.3.7", + "semver": "7.5.4", "uuid": "8.3.2" }, "engines": { @@ -4296,9 +4296,9 @@ } }, "node_modules/postman-collection/node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -8776,9 +8776,9 @@ } }, "postman-collection": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.1.5.tgz", - "integrity": "sha512-BY3NfP7EYExZG5ER9P82r0ZRc17z88WZAzn121EpWC8FM3HYtFwWJpXOsZk+2MKFn3agCq4JPRhnWw3G6XBXgw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/postman-collection/-/postman-collection-4.2.1.tgz", + "integrity": "sha512-DFLt3/yu8+ldtOTIzmBUctoupKJBOVK4NZO0t68K2lIir9smQg7OdQTBjOXYy+PDh7u0pSDvD66tm93eBHEPHA==", "requires": { "@faker-js/faker": "5.5.3", "file-type": "3.9.0", @@ -8789,7 +8789,7 @@ "mime-format": "2.0.1", "mime-types": "2.1.35", "postman-url-encoder": "3.0.5", - "semver": "7.3.7", + "semver": "7.5.4", "uuid": "8.3.2" }, "dependencies": { @@ -8810,9 +8810,9 @@ } }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "requires": { "lru-cache": "^6.0.0" } From d4706882df5ca969c0282258d944af9bbb52aa9c Mon Sep 17 00:00:00 2001 From: Jatin Parekh Date: Mon, 11 Sep 2023 19:04:04 +0530 Subject: [PATCH 06/10] Fix line length lint checks --- test/unit/convertV2.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/unit/convertV2.test.js b/test/unit/convertV2.test.js index 7736fc37..c80ca437 100644 --- a/test/unit/convertV2.test.js +++ b/test/unit/convertV2.test.js @@ -1176,12 +1176,12 @@ describe('The convert v2 Function', function() { Converter.convertV2({ type: 'string', data: openapi }, {}, (err, conversionResult) => { - expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[0].description.content).to.equal( - '(Required) QUERY PARAM DESCRIPTION' - ); - expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[1].description.content).to.equal( - 'QUERY PARAM Optional' - ); + expect( + conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[0].description.content) + .to.equal('(Required) QUERY PARAM DESCRIPTION'); + expect( + conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[1].description.content) + .to.equal('QUERY PARAM Optional'); expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description).to.equal( '(Required) Required spacecraftId path param' ); From 281abdd3de7ca811a64702a0cc1afdb6c459f06e Mon Sep 17 00:00:00 2001 From: Jatin Parekh Date: Mon, 11 Sep 2023 22:55:32 +0530 Subject: [PATCH 07/10] Update test description --- test/unit/convertV2.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/convertV2.test.js b/test/unit/convertV2.test.js index c80ca437..180ce481 100644 --- a/test/unit/convertV2.test.js +++ b/test/unit/convertV2.test.js @@ -1171,7 +1171,7 @@ describe('The convert v2 Function', function() { }); }); - it('description test', function(done) { + it('should generate a collection with description for Query Params, Path variables and Headers', function(done) { var openapi = fs.readFileSync(descriptionTestSpec, 'utf8'); Converter.convertV2({ type: 'string', data: openapi }, From 8823ceb7df5e86f24456c9b084258164ab09602a Mon Sep 17 00:00:00 2001 From: Ankit Saini Date: Tue, 12 Sep 2023 12:01:48 +0530 Subject: [PATCH 08/10] Revert "Add description for path variables to the request if present in OpenAPI schema" --- libV2/utils.js | 9 --- .../path_params_with_description.json | 55 ------------------- test/unit/convertV2.test.js | 11 ---- 3 files changed, 75 deletions(-) delete mode 100644 test/data/valid_openapi/path_params_with_description.json diff --git a/libV2/utils.js b/libV2/utils.js index 101478d1..00e952bd 100644 --- a/libV2/utils.js +++ b/libV2/utils.js @@ -66,15 +66,6 @@ const sdk = require('postman-collection'), }); requestItem.request.url.variables.assimilate(pathParams); - _.forEach(pathParams, (param) => { - if (param.description) { - const item = requestItem.request.url.variables.one(param.key); - if (!_.isEmpty(item)) { - item.description = param.description; - } - } - }); - requestItem.request.auth = auth; _.forEach(responses, (response) => { diff --git a/test/data/valid_openapi/path_params_with_description.json b/test/data/valid_openapi/path_params_with_description.json deleted file mode 100644 index 1b2509de..00000000 --- a/test/data/valid_openapi/path_params_with_description.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "version": "1.0.0", - "title": "Swagger Petstore", - "license": { - "name": "MIT" - } - }, - "servers": [ - { - "url": "http://petstore.swagger.io/v1" - } - ], - "paths": { - "/pets/{petId}": { - "get": { - "summary": "List all pets", - "operationId": "listPets", - "parameters": [ - { - "name": "petId", - "in": "path", - "description": "Id of pet", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Successful response", - "headers": { - "responseHeader1": { - "description":"Description of responseHeader1", - "required": true, - "schema": { - "type": "integer" - } - }, - "responseHeader2": { - "description":"Description of responseHeader2", - "schema": { - "type": "integer" - } - } - } - } - } - } - } - } -} diff --git a/test/unit/convertV2.test.js b/test/unit/convertV2.test.js index 180ce481..87b47e6b 100644 --- a/test/unit/convertV2.test.js +++ b/test/unit/convertV2.test.js @@ -30,7 +30,6 @@ const expect = require('chai').expect, examplesOutsideSchema = path.join(__dirname, VALID_OPENAPI_PATH + '/examples_outside_schema.json'), exampleOutsideSchema = path.join(__dirname, VALID_OPENAPI_PATH + '/example_outside_schema.json'), descriptionInBodyParams = path.join(__dirname, VALID_OPENAPI_PATH + '/description_in_body_params.json'), - descriptionInPathParams = path.join(__dirname, VALID_OPENAPI_PATH + '/path_params_with_description.json'), zeroDefaultValueSpec = path.join(__dirname, VALID_OPENAPI_PATH + '/zero_in_default_value.json'), requiredInParams = path.join(__dirname, VALID_OPENAPI_PATH, '/required_in_parameters.json'), multipleRefs = path.join(__dirname, VALID_OPENAPI_PATH, '/multiple_refs.json'), @@ -554,16 +553,6 @@ describe('The convert v2 Function', function() { }); }); - it('should add description in path params', function (done) { - var openapi = fs.readFileSync(descriptionInPathParams, 'utf-8'); - Converter.convertV2({ type: 'string', data: openapi }, { schemaFaker: true }, (err, conversionResult) => { - let description = conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description; - expect(err).to.be.null; - expect(description).to.equal('(Required) Id of pet'); - done(); - }); - }); - it('Should create collection from folder having one root file for browser', function(done) { let folderPath = path.join(__dirname, '../data/petstore separate yaml'), files = [], From 8a582a163e57a60a25308bab7437d2cde9003167 Mon Sep 17 00:00:00 2001 From: Jatin Parekh Date: Tue, 12 Sep 2023 12:10:05 +0530 Subject: [PATCH 09/10] Fix failing tests as per the reverted changes --- test/unit/convertV2.test.js | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/test/unit/convertV2.test.js b/test/unit/convertV2.test.js index 87b47e6b..ef27ceb5 100644 --- a/test/unit/convertV2.test.js +++ b/test/unit/convertV2.test.js @@ -1166,23 +1166,28 @@ describe('The convert v2 Function', function() { Converter.convertV2({ type: 'string', data: openapi }, {}, (err, conversionResult) => { expect( - conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[0].description.content) - .to.equal('(Required) QUERY PARAM DESCRIPTION'); + conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[0].description.content + ).to.equal('(Required) QUERY PARAM DESCRIPTION'); + expect( - conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[1].description.content) - .to.equal('QUERY PARAM Optional'); - expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description).to.equal( - '(Required) Required spacecraftId path param' - ); - expect(conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[1].description).to.equal( - 'Path param optional description' - ); - expect(conversionResult.output[0].data.item[0].item[0].item[0].request.header[0].description.content).to.equal( - '(Required) HEADER PARAM DESCRIPTION' - ); - expect(conversionResult.output[0].data.item[0].item[0].item[0].request.header[1].description.content).to.equal( - 'HEADER PARAM Optional' - ); + conversionResult.output[0].data.item[0].item[0].item[0].request.url.query[1].description.content + ).to.equal('QUERY PARAM Optional'); + + expect( + conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description.content + ).to.equal('(Required) Required spacecraftId path param'); + + expect( + conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[1].description.content + ).to.equal('Path param optional description'); + + expect( + conversionResult.output[0].data.item[0].item[0].item[0].request.header[0].description.content + ).to.equal('(Required) HEADER PARAM DESCRIPTION'); + + expect( + conversionResult.output[0].data.item[0].item[0].item[0].request.header[1].description.content + ).to.equal('HEADER PARAM Optional'); done(); }); }); From 6b93f95c5bdf5088105bda2f276a9aa74b48992d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 12 Sep 2023 06:49:49 +0000 Subject: [PATCH 10/10] Prepare release v4.17.0 --- CHANGELOG.md | 6 +++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1ffa5c3..b2922b4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +## [v4.17.0] - 2023-09-12 + ## [v4.16.0] - 2023-08-18 ### Added @@ -594,7 +596,9 @@ Newer releases follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0 - Base release -[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.16.0...HEAD +[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.17.0...HEAD + +[v4.17.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.16.0...v4.17.0 [v4.16.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.15.0...v4.16.0 diff --git a/package-lock.json b/package-lock.json index d3a147aa..b127c365 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "openapi-to-postmanv2", - "version": "4.16.0", + "version": "4.17.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "openapi-to-postmanv2", - "version": "4.16.0", + "version": "4.17.0", "license": "Apache-2.0", "dependencies": { "ajv": "8.11.0", diff --git a/package.json b/package.json index 83ac7e17..62f44e1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openapi-to-postmanv2", - "version": "4.16.0", + "version": "4.17.0", "description": "Convert a given OpenAPI specification to Postman Collection v2.0", "homepage": "https://github.com/postmanlabs/openapi-to-postman", "bugs": "https://github.com/postmanlabs/openapi-to-postman/issues",