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

Question: NodeJS module - Default convert version? #816

Open
thim81 opened this issue Jul 25, 2024 · 4 comments
Open

Question: NodeJS module - Default convert version? #816

thim81 opened this issue Jul 25, 2024 · 4 comments

Comments

@thim81
Copy link
Contributor

thim81 commented Jul 25, 2024

Hi @VShingala

I spotted that using the openapi-to-postman as a Node module, default to moduleVersion V1

class SchemaPack {
  constructor (input, options = {}, moduleVersion = MODULE_VERSION.V1) {

Does this mean, that using require('openapi-to-postmanv2') uses the V1?

@thim81
Copy link
Contributor Author

thim81 commented Jul 25, 2024

Nevermind, I found out that there are 2 functions 'convert' and 'convertV2'.

If V2 is the default, it might be good to rework the https://github.com/postmanlabs/openapi-to-postman?tab=readme-ov-file#sample-usage to use convertV2?

Or is there another reason to keep convert as the primary function?

@thim81 thim81 changed the title Question: NodeJS module - Default version? Question: NodeJS module - Default convert version? Jul 25, 2024
@VShingala
Copy link
Member

@thim81 Yeah, we've started using convertV2 for some time now. At time, when we worked on v2 APIs, we wanted to make sure they don't have any issues with them. But now we're at a point where v2 APIs are stable and can be updated in README.md as well.

@thim81
Copy link
Contributor Author

thim81 commented Jul 25, 2024

Understood, I'll create a small PR to update the readme usingconvertV2 and hint that the should about using parametersResolution instead of the V1 only exampleParametersResolution, requestParametersResolution as options.

@VShingala
Copy link
Member

@thim81 Thanks! That would help a lot.

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

2 participants