[PR #2575] [MERGED] feat: added support for path variables #3913

Closed
opened 2026-03-17 01:29:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2575
Author: @MasonJason23
Created: 8/10/2022
Status: Merged
Merged: 10/29/2022
Merged by: @AndrewBastin

Base: reference/path-variablesHead: codeday/main


📝 Commits (10+)

  • fd5db6c Duplicated and disconnected parameter UI for reuse
  • 21021a3 Removed reference to 'bulk params'
  • 9b60dc5 Modified HoppRESTRequest data structure
  • 1a629a1 localy stored variable data
  • 7006fa5 Small naming changes
  • 5413bc5 Added missing dispatcher and function
  • 722864d update tw.json (#2511)
  • c0e3a2b fix: disabled search in team collection (#2523)
  • d335ac1 fix: search panel position in response (#2510)
  • 09e6fb2 Merge branch 'hoppscotch:main' into codeday/jason

📊 Changes

51 files changed (+1813 additions, -527 deletions)

View changed files

📝 README.md (+1 -1)
📝 packages/hoppscotch-app/components/app/PaneLayout.vue (+68 -6)
📝 packages/hoppscotch-app/components/collections/index.vue (+1 -0)
📝 packages/hoppscotch-app/components/collections/my/Request.vue (+8 -1)
📝 packages/hoppscotch-app/components/collections/teams/Request.vue (+2 -2)
📝 packages/hoppscotch-app/components/http/Parameters.vue (+7 -357)
packages/hoppscotch-app/components/http/PathVariables.vue (+271 -0)
packages/hoppscotch-app/components/http/QueryParams.vue (+363 -0)
📝 packages/hoppscotch-app/components/http/Request.vue (+2 -1)
📝 packages/hoppscotch-app/components/http/RequestOptions.vue (+12 -1)
📝 packages/hoppscotch-app/components/smart/EnvInput.vue (+17 -0)
📝 packages/hoppscotch-app/helpers/curl/__tests__/curlparser.spec.js (+31 -0)
📝 packages/hoppscotch-app/helpers/curl/curlparser.ts (+2 -1)
📝 packages/hoppscotch-app/helpers/editor/extensions/HoppEnvironment.ts (+4 -3)
packages/hoppscotch-app/helpers/editor/extensions/HoppVariable.ts (+149 -0)
📝 packages/hoppscotch-app/helpers/editor/themes/baseTheme.ts (+5 -1)
📝 packages/hoppscotch-app/helpers/functional/record.ts (+36 -1)
📝 packages/hoppscotch-app/helpers/keybindings.ts (+1 -0)
📝 packages/hoppscotch-app/helpers/shortcuts.js (+3 -3)
📝 packages/hoppscotch-app/helpers/utils/EffectiveURL.ts (+47 -20)

...and 31 more files

📄 Description

Closes #2086

Description

Created a secondary UI component under Query Parameters as "My Variables" which has the same functionality as Environment Variables. Allows users to make variables to use within the request input bar using curly brackets {{}}.

TODO

  • Add a warning message for recursive error loops

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

  • Added a new custom type (HoppRESTVar) and modified the data structure of the existing data structure (HoppRESTRequest).

"My Variable" Feature in Action

My Variables in Action


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/2575 **Author:** [@MasonJason23](https://github.com/MasonJason23) **Created:** 8/10/2022 **Status:** ✅ Merged **Merged:** 10/29/2022 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `reference/path-variables` ← **Head:** `codeday/main` --- ### 📝 Commits (10+) - [`fd5db6c`](https://github.com/hoppscotch/hoppscotch/commit/fd5db6c8c9556ebad1f78d08ccca87ae2399a8bd) Duplicated and disconnected parameter UI for reuse - [`21021a3`](https://github.com/hoppscotch/hoppscotch/commit/21021a3cd971c3fa6a0dd66f70663333cb7c768f) Removed reference to 'bulk params' - [`9b60dc5`](https://github.com/hoppscotch/hoppscotch/commit/9b60dc5f2de8ac23dc7042935e0b6db763f0ae0b) Modified HoppRESTRequest data structure - [`1a629a1`](https://github.com/hoppscotch/hoppscotch/commit/1a629a1219eef544053013e3da5eef4a2cec2e11) localy stored variable data - [`7006fa5`](https://github.com/hoppscotch/hoppscotch/commit/7006fa57e27dcaf170466f76bb3562a5a5cbef22) Small naming changes - [`5413bc5`](https://github.com/hoppscotch/hoppscotch/commit/5413bc584a9932e54197c9e1d9e9dd5d88ec315a) Added missing dispatcher and function - [`722864d`](https://github.com/hoppscotch/hoppscotch/commit/722864da624e1cd8e74013adeacca429352cb8e6) update tw.json (#2511) - [`c0e3a2b`](https://github.com/hoppscotch/hoppscotch/commit/c0e3a2be0bd9d53027a17a124ed74061dc40f664) fix: disabled search in team collection (#2523) - [`d335ac1`](https://github.com/hoppscotch/hoppscotch/commit/d335ac1d8015554a49217ff64078f0b003073568) fix: search panel position in response (#2510) - [`09e6fb2`](https://github.com/hoppscotch/hoppscotch/commit/09e6fb246a4b73b5a42f1acbfe08e1afeaed39c1) Merge branch 'hoppscotch:main' into codeday/jason ### 📊 Changes **51 files changed** (+1813 additions, -527 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `packages/hoppscotch-app/components/app/PaneLayout.vue` (+68 -6) 📝 `packages/hoppscotch-app/components/collections/index.vue` (+1 -0) 📝 `packages/hoppscotch-app/components/collections/my/Request.vue` (+8 -1) 📝 `packages/hoppscotch-app/components/collections/teams/Request.vue` (+2 -2) 📝 `packages/hoppscotch-app/components/http/Parameters.vue` (+7 -357) ➕ `packages/hoppscotch-app/components/http/PathVariables.vue` (+271 -0) ➕ `packages/hoppscotch-app/components/http/QueryParams.vue` (+363 -0) 📝 `packages/hoppscotch-app/components/http/Request.vue` (+2 -1) 📝 `packages/hoppscotch-app/components/http/RequestOptions.vue` (+12 -1) 📝 `packages/hoppscotch-app/components/smart/EnvInput.vue` (+17 -0) 📝 `packages/hoppscotch-app/helpers/curl/__tests__/curlparser.spec.js` (+31 -0) 📝 `packages/hoppscotch-app/helpers/curl/curlparser.ts` (+2 -1) 📝 `packages/hoppscotch-app/helpers/editor/extensions/HoppEnvironment.ts` (+4 -3) ➕ `packages/hoppscotch-app/helpers/editor/extensions/HoppVariable.ts` (+149 -0) 📝 `packages/hoppscotch-app/helpers/editor/themes/baseTheme.ts` (+5 -1) 📝 `packages/hoppscotch-app/helpers/functional/record.ts` (+36 -1) 📝 `packages/hoppscotch-app/helpers/keybindings.ts` (+1 -0) 📝 `packages/hoppscotch-app/helpers/shortcuts.js` (+3 -3) 📝 `packages/hoppscotch-app/helpers/utils/EffectiveURL.ts` (+47 -20) _...and 31 more files_ </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #2086 <!-- Issue # here --> ### Description <!-- Add a brief description of the pull request --> Created a secondary UI component under Query Parameters as "My Variables" which has the same functionality as Environment Variables. Allows users to make variables to use within the request input bar using curly brackets `{{}}`. ### TODO - [ ] Add a warning message for recursive error loops ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [ ] My pull request adheres to the code style of this project - [x] My code requires changes to the documentation - [ ] I have updated the documentation as required - [ ] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behavior, etc. --> - Added a new custom type (`HoppRESTVar`) and modified the data structure of the existing data structure (`HoppRESTRequest`). ### "My Variable" Feature in Action ![My Variables in Action](https://user-images.githubusercontent.com/78059373/184030938-d2e93dc8-f208-4cb1-ad71-ea1178466add.JPG) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:29:20 +03:00
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#3913
No description provided.