Skip to content

Commit 8823ceb

Browse files
authored
Revert "Add description for path variables to the request if present in OpenAPI schema"
1 parent 17211ac commit 8823ceb

File tree

3 files changed

+0
-75
lines changed

3 files changed

+0
-75
lines changed

libV2/utils.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ const sdk = require('postman-collection'),
6666
});
6767

6868
requestItem.request.url.variables.assimilate(pathParams);
69-
_.forEach(pathParams, (param) => {
70-
if (param.description) {
71-
const item = requestItem.request.url.variables.one(param.key);
72-
if (!_.isEmpty(item)) {
73-
item.description = param.description;
74-
}
75-
}
76-
});
77-
7869
requestItem.request.auth = auth;
7970

8071
_.forEach(responses, (response) => {

test/data/valid_openapi/path_params_with_description.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

test/unit/convertV2.test.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const expect = require('chai').expect,
3030
examplesOutsideSchema = path.join(__dirname, VALID_OPENAPI_PATH + '/examples_outside_schema.json'),
3131
exampleOutsideSchema = path.join(__dirname, VALID_OPENAPI_PATH + '/example_outside_schema.json'),
3232
descriptionInBodyParams = path.join(__dirname, VALID_OPENAPI_PATH + '/description_in_body_params.json'),
33-
descriptionInPathParams = path.join(__dirname, VALID_OPENAPI_PATH + '/path_params_with_description.json'),
3433
zeroDefaultValueSpec = path.join(__dirname, VALID_OPENAPI_PATH + '/zero_in_default_value.json'),
3534
requiredInParams = path.join(__dirname, VALID_OPENAPI_PATH, '/required_in_parameters.json'),
3635
multipleRefs = path.join(__dirname, VALID_OPENAPI_PATH, '/multiple_refs.json'),
@@ -554,16 +553,6 @@ describe('The convert v2 Function', function() {
554553
});
555554
});
556555

557-
it('should add description in path params', function (done) {
558-
var openapi = fs.readFileSync(descriptionInPathParams, 'utf-8');
559-
Converter.convertV2({ type: 'string', data: openapi }, { schemaFaker: true }, (err, conversionResult) => {
560-
let description = conversionResult.output[0].data.item[0].item[0].item[0].request.url.variable[0].description;
561-
expect(err).to.be.null;
562-
expect(description).to.equal('(Required) Id of pet');
563-
done();
564-
});
565-
});
566-
567556
it('Should create collection from folder having one root file for browser', function(done) {
568557
let folderPath = path.join(__dirname, '../data/petstore separate yaml'),
569558
files = [],

0 commit comments

Comments
 (0)