joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
596 stars 104 forks source link

Substitute postman variables as examples. #157

Closed alexevansigg closed 2 years ago

alexevansigg commented 2 years ago

When using postman variables as path parameters the tool correctly interprets these as parameters which can be changed by end users of the swagger doc.

If we use the replace variables flag then they values from them are substituted as expected, but then they are no longer recognised as a parameter.

A nicer solution is to add a flag where we can instead of doing variable replacement set the postman variable values as parameter examples... doing so they become the default value in the doc but can still be overridden by the end user.

joolfe commented 2 years ago

Hi @alexevansigg,

Since version 1.17.0 the correct way to define path variables is using the postman way, see #130 for more info, this is totally compatible with variable replace.

Best regards