thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Global Environment as documentation

Open Alexandre-Nourissier opened this issue 3 years ago • 1 comments

Very exciting tool! I am considering switching my team from Postman to Thunder Client.

Is your feature request related to a problem? Please describe. I use the global environment, local environment, and multiple "custom" environments and can't use the global environment as documentation.

As part of a team, I want to document (not necessarily set) all the variables, even the secrets in the global environment, so that the developers have a one-stop shop to see all the variables that they can use/secrets that they have to provide in their local environment. For this purpose, I add the variables (without setting a value) in the global environment. I then set the value for the non-secret ones in the custom environment. I then set the value for the secret ones in the local environment.

The secret values are ignored when sending the request. Removing the secret variable's definition in the global environment lets the local's value be considered.

Describe the solution you'd like Empty values continue to overwrite values set in less-prioritized environments so as not to break the existing configurations. If an empty value is set, we should offer the opportunity NOT to overwrite already set values (the default value is "overwrite", I am thinking of a check-box on each variable line).

Describe alternatives you've considered

  • Empty values should be saved and manipulated as undefined instead of empty string. / Empty values shouldn't overwrite values set in a less prioritized environment.
  • Save the local's variables' name to the thunderEnvironment.json file.
  • Switch Local environment and Global Environment in priority order.

Implementation: N/A

Alexandre-Nourissier avatar Aug 28 '22 23:08 Alexandre-Nourissier

@Alexandre-Nourissier thanks for the feedback, will review it.

rangav avatar Aug 28 '22 23:08 rangav

The order of Local and Global Env is reversed, Now Local Env override Global Env values , please update to v1.19.4

See all features released https://github.com/rangav/thunder-client-support/releases/tag/v1.19.4

Please let me know your feedback.

rangav avatar Oct 03 '22 16:10 rangav

Save the local's variables' name to the thunderEnvironment.json file.

why you like to save local env names in the thunderEnvironment.json file?

rangav avatar Oct 04 '22 06:10 rangav

Wasn't too sure about this proposition; it would require more work (I think?). It might even be going against the current design. Don't pay too much attention to it. Reversing the priority was considered last as I saw it as a "breaking change". But it was the simplest and more natural solution. Thank you for checking and for your hard work. I will take the time to have another go at Thunder Client in the coming days.

Alexandre-Nourissier avatar Oct 05 '22 21:10 Alexandre-Nourissier

The order of Local and Global Env is reversed, Now Local Env override Global Env values , please update to v1.19.4

See all features released https://github.com/rangav/thunder-client-support/releases/tag/v1.19.4

Please let me know your feedback.

Works great! @rangav I will be able to present it as a viable alternative now. Thanks!

Alexandre-Nourissier avatar Oct 09 '22 23:10 Alexandre-Nourissier

Thanks for confirmation 👍

rangav avatar Oct 10 '22 05:10 rangav

I am closing this issue, current we do not plan to implement the other suggestions

rangav avatar Mar 11 '23 08:03 rangav