Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interface-version option isn't working #827

Open
yokawasa opened this issue Sep 12, 2024 · 0 comments
Open

interface-version option isn't working #827

yokawasa opened this issue Sep 12, 2024 · 0 comments

Comments

@yokawasa
Copy link
Member

About

It looks interface-version option (-i or --interface-version) is not working.

-i, --interface-version Specifies the interface version of the converter to be used. Value can be 'v2' or 'v1'. Default is 'v2'.

How to reproduce

I run the following command where I gave v1 only supported option requestParametersResolution:

openapi2postmanv2 -s ./oas.json \
    -o collection.json -p \
    -O folderStrategy=Tags, requestParametersResolution=Example,enableOptionalParameters=false

But I got the following output and found requestParametersResolution didn't work

Warning: Invalid option supplied  requestParametersResolution
Input file:  /Users/yoichi.kawasaki/test/oas.json
Writing to file:  true /Users/yoichi.kawasaki/test/collection.json {
  result: true,
  output: [ { type: 'collection', data: [Object] } ],
  analytics: {}
}
Conversion successful, collection written to file

So I run the following command where I specified interface-version as v1 with interface-version option (-i or --interface-version):

openapi2postmanv2 -i v1 -s ./oas.json \
    -o collection.json -p \
    -O folderStrategy=Tags, requestParametersResolution=Example,enableOptionalParameters=false

However I got the same warning message and found requestParametersResolution still didn't work.
My expectation is enableOptionalParameters should work when I run the command by specifying v1 as interface-version with interface-version option (-i or --interface-version).

Environment info

node --version
v18.19.0

openapi2postmanv2 -v 
4.24.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant