Closed thim81 closed 3 years ago
Proposal to solve this:
openapi2postmanv2.js - Line 55
.option('-O, --options <options>', 'comma separated list of options', parseOptions)
Replace with
.option('-O, --options-cli <optionsCli>', 'comma separated list of options', parseOptions)
openapi2postmanv2.js Line 82
definedOptions = program.options || {};
Replace with
definedOptions = program.optionsCli || {};
Thanks for raising issue and PR as well 😄. I have reviewed the PR and it looks good to me apart from the change suggested. Let me know when you address the change. I will approve and merge the PR.
@VShingala I'll look into the suggested change of correct if possible
PR is updated and should be ready to go
Resolved as part of the 2.1.0 release
The options from the ConfigFile are getting overwritten by the DefinedOptions, which should contain the CLI -O values but they contain all the CLI options and not the property
openapi2postmanv2 -s openapi.yaml -o postman.json -p -c postman/openapi-to-postman-config.json
openapi2postmanv2.js - Line 122
OUTPUT
If you use
openapi2postmanv2 -s openapi.yaml -o postman.json -p -c postman/openapi-to-postman-config.json -O folderStrategy=Tags
Then the OUTPUT is correct