mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #2086] [feature]: Support for Path Variables #693
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#693
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 @christopheblin on GitHub (Jan 25, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2086
Originally assigned to: @AndrewBastin on GitHub.
Is there an existing issue for this?
Current behavior
When I import the petstore collection and I try to use a method with a path variable inside, the app does not provide an easy way to provide them
I know I can simply override the url in the request, but this is not the "goal"
What I'd like is that if I setup a parameter with the same name as in the path, it is used instead of being used as an additional query param
Steps to reproduce
Import petstore openapi
Load the uploadFile request
Add a baseUrl env var (this will turn the baseUrl variable blue in the path)
=> when I provide a parameter with the name petId, it should be used in the path (and marked as blue)
Environment
Production
Version
Local
@AndrewBastin commented on GitHub (Mar 4, 2022):
@christopheblin Thank you for opening the issue. We need a mechanism for Path Variables. (Currently we have none).
We will have a look at this soon.
@ace-n commented on GitHub (Apr 12, 2022):
Hey @AndrewBastin,
I might have some time to hack on this, if you haven't already started work. 🙂
One question though - do we know what the UI should look like? A few options come to mind:
queryorpathparameterSide note: for my team's use case, I may also need to add environment variable support. (We need to switch between [not-entirely-deterministic]
DEVandPRODURLs easily.) Happy to file another issue for that, but I wanted to make sure it's in line with your vision for the project before I start work on anything.Note to self: this file and
parameter_listseem relevant.@AndrewBastin commented on GitHub (Apr 13, 2022):
Heyyo @ace-n!
Yeah, I guess, in terms of files you are right.
Although, in terms of UI, I think having them separated as separate lists in the same Parameters Tab makes more sense as it segregates both the Query Params and Params clearly. (@liyasthomas thoughts ?)
We need to update the REST Request structure to allow for that option though, which it doesn't currently, so you will have to consider that as well.
If you are interested, you can take this up.
@arthurspa commented on GitHub (Mar 10, 2023):
Would be nice to have this feature implemented.
@shivamkj commented on GitHub (Jul 31, 2023):
Waiting for this feature
@mwkcoding commented on GitHub (Sep 5, 2023):
I stumbled upon this issue after finding #834 and a referenced merged PR #840 where it supposedly was already implemented and has been lost? So are we really waiting for it to be implemented again?
@greguz commented on GitHub (Sep 18, 2023):
Waiting for this. 👀
May I help with something to speed up the release?
@odie5533 commented on GitHub (Oct 9, 2023):
Would love to see this get added!
@azvyae commented on GitHub (Oct 25, 2023):
Bump this thread, still waiting this feature to be added in the UI
@azvyae commented on GitHub (Oct 25, 2023):
@mwkcoding probably because that was the old UI, they refactored the UI for hoppscotch, so, we just have to wait
@Chinoman10 commented on GitHub (Jan 3, 2024):
Our team just migrated from Postman to Hoppscotch only to find out that this feature didn't exist on Hoppscotch yet...
The PR someone made in 2022 got merged into an internal branch and since then it's been ignored for over an entire year.
Apart from this missing feature, Hoppscotch has been great so far, but tbh was quite surprised about this.
Hoping this can become prioritized by the team since it's on their hands now 🤞
@carsonbird commented on GitHub (Jan 4, 2024):
Ho-ly snap, I'm blown away that this isn't a feature. No negativity here, I appreciate what you guys are doing. I just wasn't expecting it. Anything I can do to help?
Sorry, revising my comment - what I'm looking for, which is simply accessing environment variables in the URL portion of a request, is absolutely implemented. I think what @christopheblin is referring to is being able to access the request URL as a variable within the request itself? Or maybe an easy way to create variables from within the URL editor itself? Honestly, I'm not sure. Some additional clarity would be helpful.
@Chinoman10, I want to make sure you saw this just in case you're in the same position as me. You can access variables with < < variable > >.
@liyasthomas commented on GitHub (Jan 4, 2024):
We've prioritized this feature for the next major release candidate scheduled for the first week of March. Thanks for the feedback.
@liyasthomas commented on GitHub (May 1, 2024):
Thanks for your patience and valuable feedback. This feature has been implemented in a previous release candidate.
Closing this ticket as this feature is now available in the recent version. Please feel free to reach out if you have any other concerns.
@woutervanranst commented on GitHub (May 24, 2024):
hi @liyasthomas when will this go into the main release?
@Chinoman10 commented on GitHub (May 24, 2024):
It is already on the main release.
Here's an example:

@woutervanranst commented on GitHub (May 24, 2024):
brilliant - apologies for the oversight
@sopi20 commented on GitHub (Oct 4, 2024):
Is this implementend only for rest endpoints and unavailable for graphql ? 😳
@MCterra10 commented on GitHub (Feb 16, 2025):
ty for adding this guys