joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
577 stars 99 forks source link

Conversion fails if the collection contains dynamic variables #258

Open vinitshahdeo opened 1 year ago

vinitshahdeo commented 1 year ago

Postman uses the faker library to generate sample data, including random names, addresses, email addresses, and much more. These are present as dynamic variables in the Postman collection. However, when converting the collection containing these variables, it is necessary to resolve them accurately.

Presently, the conversion process fails if the collection contains dynamic variables, for example:

{
    "version": "{{$randomWord}}",
    "uptime": {{$randomInt}},
    "mem": {{$randomInt}},
    "load": [
        {{$randomInt}},
        {{$randomInt}},
        {{$randomInt}}
    ]
}

Here's the list of supported dynamic variables.

joolfe commented 11 months ago

Hi @vinitshahdeo,

Support of postman auto generated variables could be a cool feature, if lot of people is interested in it I will have a look but meanwhile you just need to provide a vale for this variables in the 'additionalVars' option to make you collection works.

Best regard