mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5461] [CLOSED] Feature: Postman-Style Nested Environment Variables #5222
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#5222
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?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5461
Author: @Sambhram1
Created: 10/7/2025
Status: ❌ Closed
Base:
main← Head:ftr-7📝 Commits (2)
8c0e34fftr-7382eb7eMerge branch 'main' into ftr-7📊 Changes
7 files changed (+914 additions, -16 deletions)
View changed files
➕
IMPLEMENTATION_PLAN.md(+137 -0)➕
NESTED_ENVIRONMENT_VARIABLES.md(+179 -0)📝
packages/hoppscotch-data/src/environment/index.ts(+182 -8)➕
packages/hoppscotch-data/src/environment/nested-parser.ts(+233 -0)➕
packages/hoppscotch-data/src/environment/test-nested-vars.ts(+113 -0)📝
packages/hoppscotch-js-sandbox/src/bootstrap-code/post-request.js(+35 -4)📝
packages/hoppscotch-js-sandbox/src/bootstrap-code/pre-request.js(+35 -4)📄 Description
This PR implements Postman-style nested environment variables in Hoppscotch, enabling dynamic variable key construction like {{ {{country-code}}{{environment}} }}. This addresses a critical user need where maintaining 450+ separate environments is now reduced to 15 dynamic variables in a single environment configuration.
🎯 Problem Solved
User Pain Point: Postman supports nested environment variables like {{ {{country-code}}{{environment}} }} but Hoppscotch doesn't. This limitation forces users to create hundreds of separate environments instead of using dynamic templating, significantly reducing productivity and increasing configuration complexity.
Before: 450+ separate environments
After: 15 dynamic variables in 1 environment
✨ Features Added
🔄 Dual Syntax Support
Existing Hoppscotch: <> (fully backward compatible)
NEW Postman Style: {{variable}}
Mixed Syntax: <<{{country}}>> or {{<>}}
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.