Closed KillianLeroux closed 3 years ago
Release 1.16.0 should fix this. You will need to create an options.json file and set the replaceVars
key to true
. Though you might run into another error if the collection file doesn't have a variable
key. I just submitted a PR (#137) to fix that.
"base_url" is an environment variable, not de collection variable, so the value isn't in Collection JSON Export. With previous version it wasn't a problem: I added "servers" in options.json and all was OK.
How do you use Postman for the URL between several environments? One request per environment? Or you use "Environment" feature with "base_url" variable?
Example:
Hi @KillianLeroux,
I have to change the scrapeURL
function as with the var replacement in collections v2.1 after replacing variables in the url the structure was not correct, I didn´t know that before replace if you use a base_url
was working fine, I will have a look to find a solution so without replacing this is still valid, mean while you just can put a base_url variable for replace and continue using the servers
options and everything should works.
Best Regards.
@joolfe I think that comment was meant for @KillianLeroux.
Hi!
I tried to execute library with the latest version (1.16.0) and I have this error:
Apparently it's because variables don't replaced ( here: {{base_url}} ).
It's just a note, I know it's already planned to add this feature ;)
My function "setVars" provided here: https://github.com/joolfe/postman-to-openapi/issues/131#issuecomment-889942833 could be useful:
Kisses :)