Bug: R Code Generation Does Not Quote Parameters with Special Characters (e.g., `codes[]`)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by running the R fixture at src/targets/r/httr/fixtures/nested.r and inspect the R target code that generates its queryString list. Confirm the failure with keys such as foo[bar] or demo-param; done means the generated snippet uses valid quoted names and executes successfully in R.
Written by the indexing model from the issue text.
Description
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"
)
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Kong/httpsnippet
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Kong/httpsnippet#356 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Kong/httpsnippet#389 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Kong/httpsnippet#383 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Kong/httpsnippet#370 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Kong/httpsnippet#361 ·
All issues in Kong/httpsnippet
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·