Bug: R Code Generation Does Not Quote Parameters with Special Characters (e.g., `codes[]`)
還沒有人認領這個 Issue。
評估
研究方向
首先執行 src/targets/r/httr/fixtures/nested.r 中的 R fixture,並檢查產生其 queryString 清單的 R target code。使用 foo[bar] 或 demo-param 等鍵確認此失敗;當產生的 snippet 使用有效的帶引號名稱並在 R 中成功執行時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
When using the library to convert an HTTP request into an R code snippet, parameters with special characters (such as codes[] or demo-param) are not being quoted correctly in the generated R code. This causes an error in R because such parameters are not valid without quotes.
In R, certain special characters like [], -, and others are not valid in unquoted object names. As a result, the generated R code fails to execute properly when using such parameters.
I also saw a test case at "https://github.com/Kong/httpsnippet/blob/master/src/targets/r/httr/fixtures/nested.r" which doesn't run in R,
it gives following error
Error: unexpected '=' in:
"queryString <- list(
foo[bar] ="
Execution halted
Instead it should be like this to run correctly and avoid any special character issues.
queryString <- list(
`foo[bar]` = "baz,zap",
`fiz` = "buz"
)
- 主要語言
- TypeScript
- 星號
- 1.2k
- 分支
- 242
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Kong/httpsnippet 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 62/100
Kong/httpsnippet#356 ·
-
難度 3/5 1-2 天 新手友好度 35/100
Kong/httpsnippet#389 ·
-
難度 5/5 一週以上 新手友好度 25/100
Kong/httpsnippet#383 ·
-
難度 3/5 1-2 天 新手友好度 48/100
Kong/httpsnippet#370 ·
-
難度 3/5 1-2 天 新手友好度 35/100
Kong/httpsnippet#361 ·
相似的 Issue
-
comp/desktop P3 type/bug
難度 1/5 1 小時以內 新手友好度 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 85/100
getsentry/sentry-javascript#24577 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 68/100
chrisparsons83/flexspotff#153 ·