[GH-ISSUE #2086] [feature]: Support for Path Variables #693

Closed
opened 2026-03-16 16:42:33 +03:00 by kerem · 19 comments
Owner

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?

  • I have searched the existing issues

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

Capture d’écran 2022-01-25 133509

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

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? - [X] I have searched the existing issues ### 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 ![Capture d’écran 2022-01-25 133509](https://user-images.githubusercontent.com/11044877/150978031-33b2b514-3756-49e0-8bb0-45f2c14d11fd.png) 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
kerem 2026-03-16 16:42:33 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@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.

<!-- gh-comment-id:1059373806 --> @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.
Author
Owner

@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:

  • A section for Query Parameters at the top, followed by a section for Path Parameters
  • A single parameter section, with a new column that states (via words or an icon) whether something is a query or path parameter

Side note: for my team's use case, I may also need to add environment variable support. (We need to switch between [not-entirely-deterministic] DEV and PROD URLs 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_list seem relevant.

<!-- gh-comment-id:1096961644 --> @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: - A section for **Query Parameters** at the top, _followed by_ a section for **Path Parameters** - A single parameter section, with a new column that states (via words or an icon) whether something is a `query` or `path` parameter Side note: for my team's use case, I may also need to add _environment variable_ support. (We need to switch between [not-entirely-deterministic] `DEV` and `PROD` URLs 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](https://github.com/hoppscotch/hoppscotch/blob/8197458a4bb32da1737e13bff4d0010a3be3a119/packages/hoppscotch-app/components/http/Parameters.vue) and `parameter_list` seem relevant.
Author
Owner

@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.

<!-- gh-comment-id:1097404593 --> @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.
Author
Owner

@arthurspa commented on GitHub (Mar 10, 2023):

Would be nice to have this feature implemented.

<!-- gh-comment-id:1463885777 --> @arthurspa commented on GitHub (Mar 10, 2023): Would be nice to have this feature implemented.
Author
Owner

@shivamkj commented on GitHub (Jul 31, 2023):

Waiting for this feature

<!-- gh-comment-id:1658488048 --> @shivamkj commented on GitHub (Jul 31, 2023): Waiting for this feature
Author
Owner

@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?

<!-- gh-comment-id:1706239232 --> @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?
Author
Owner

@greguz commented on GitHub (Sep 18, 2023):

Waiting for this. 👀
May I help with something to speed up the release?

<!-- gh-comment-id:1723115210 --> @greguz commented on GitHub (Sep 18, 2023): Waiting for this. :eyes: May I help with something to speed up the release?
Author
Owner

@odie5533 commented on GitHub (Oct 9, 2023):

Would love to see this get added!

<!-- gh-comment-id:1752355641 --> @odie5533 commented on GitHub (Oct 9, 2023): Would love to see this get added!
Author
Owner

@azvyae commented on GitHub (Oct 25, 2023):

Bump this thread, still waiting this feature to be added in the UI

<!-- gh-comment-id:1778750817 --> @azvyae commented on GitHub (Oct 25, 2023): Bump this thread, still waiting this feature to be added in the UI
Author
Owner

@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

<!-- gh-comment-id:1778751991 --> @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
Author
Owner

@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 🤞

<!-- gh-comment-id:1875093951 --> @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 🤞
Author
Owner

@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 > >.

<!-- gh-comment-id:1877582841 --> @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 > >.
Author
Owner

@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.

<!-- gh-comment-id:1877629580 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2088158661 --> @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.
Author
Owner

@woutervanranst commented on GitHub (May 24, 2024):

hi @liyasthomas when will this go into the main release?

<!-- gh-comment-id:2129557824 --> @woutervanranst commented on GitHub (May 24, 2024): hi @liyasthomas when will this go into the main release?
Author
Owner

@Chinoman10 commented on GitHub (May 24, 2024):

hi @liyasthomas when will this go into the main release?

It is already on the main release.

Here's an example:
image

<!-- gh-comment-id:2129613465 --> @Chinoman10 commented on GitHub (May 24, 2024): > hi @liyasthomas when will this go into the main release? It is already on the main release. Here's an example: ![image](https://github.com/hoppscotch/hoppscotch/assets/8300763/c475db3f-0c55-4af2-a5e2-1114a4498de5)
Author
Owner

@woutervanranst commented on GitHub (May 24, 2024):

brilliant - apologies for the oversight

<!-- gh-comment-id:2129671190 --> @woutervanranst commented on GitHub (May 24, 2024): brilliant - apologies for the oversight
Author
Owner

@sopi20 commented on GitHub (Oct 4, 2024):

Is this implementend only for rest endpoints and unavailable for graphql ? 😳

<!-- gh-comment-id:2393050163 --> @sopi20 commented on GitHub (Oct 4, 2024): Is this implementend only for rest endpoints and unavailable for graphql ? 😳
Author
Owner

@MCterra10 commented on GitHub (Feb 16, 2025):

ty for adding this guys

<!-- gh-comment-id:2661687387 --> @MCterra10 commented on GitHub (Feb 16, 2025): ty for adding this guys
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#693
No description provided.