mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4420] [feature]: Support for Variables in Collections #1621
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1621
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Lyxnode on GitHub (Oct 9, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4420
Is there an existing issue for this?
Summary
I am requesting the addition of a feature that allows users to define and use variables within collections, not just in environments. This feature would significantly enhance the flexibility, maintainability, and reusability of collections.
Why should this be worked on?
Implementing variables in collections will provide significant benefits in terms of modularity, ease of use, maintainability, and collaboration. It aligns with modern development practices and addresses several pain points currently faced by developers. By adding this feature, it will enhance its platform's functionality and provide a more powerful and flexible setup for the collections, ultimately leading to better software outcomes.
There are siturations where you want to have some variants on a collection, but don't want to set it up in an environment.
@samcoppock commented on GitHub (Oct 9, 2024):
I will have a go at this as part of hacktoberfest.
To be sure i have understood the request
On the just right of the centre of the screen there is a vertical menu with 'environments' and 'collections' as the first 2 options.
if you click on either then click new ( on the right of them ) you get a modal.
the 'environments' modal has an option for adding variables
the 'collections' one does not.
Are you asking for this to also be added to the modal that appears when you click collections->new ?
@kris-hamade commented on GitHub (Oct 9, 2024):
I believe what they are requesting is something similar to what I'm looking for. In Postman you currently have variables at several levels.
Global > Environment > Collection
this is in lieu of not having variables directly on the request level. This would definitely be a very nice to have feature and would help a lot of people immensely.
At my current job we nest a lot of variables based on collection and environments that populate when certain requests are made and not having it at the collection level creates a lot more work
Something like that picture.
Edit: I realize that example wouldn't work but hopefully you get the idea. You could check this out in postman.
@Lyxnode commented on GitHub (Oct 10, 2024):
That's exactly what I'm referring to @kris-hamade – the ability to set variables on collections.
@ThomasL81 commented on GitHub (Nov 26, 2024):
Hi, I am interested as well. It would also be nice to include 'folder' as a level to specify/inherit them.
In my use case, I have a data api with similar get/put/patch/delete requests per object type. Then, having a folder per object type and specifying them in variables, would make maintenance a lot easier.
Watching this feature request.
Cheers!
@kris-hamade commented on GitHub (Apr 3, 2025):
Any update on this @samcoppock?
@samcoppock commented on GitHub (Apr 9, 2025):
Im not currently working on this - too busy with other things. @kris-hamade
@Lyxnode commented on GitHub (Jun 1, 2025):
@liyasthomas Can you link to the other feature request that this is a duplicate of?
@liyasthomas commented on GitHub (Jun 1, 2025):
https://github.com/hoppscotch/hoppscotch/issues/3736