Prettify not working when “JSON body” contains variable
Hello, I noticed a bug related to “Prettify” functionality when I put variables in a “JSON body”.
Example: I have a variable named " input_idx" (it is an integer). The “Prettify” for this “JSON body” is not possible: {"method": "test", "params": {"input" : {{input_idx}} }}
Tested with Bruno v1.8.0 on Ubuntu 22.04.
Are you actually able to access the variable? I can't manage to get bruno to work at all if I pass a variable the way you did
Are you actually able to access the variable? I can't manage to get bruno to work at all if I pass a variable the way you did
Yes, the variable is correctly expanded/replaced by Bruno with its value (in my case, Bruno sends a HTTP POST). Only the prettify functionality is affected. I just retested with Bruno v1.11.0, on WSL Ubuntu 22.04.
Got it, thanks. Super weird, in my case Bruno sends the variable with the curly brackets to the backend. I'm closely monitoring #1812 in case that fixes it at the same occasion
Update: on version v1.17.0, the prettify generates an invalid JSON from my example.
{
"method": "test",
"params": {
"input": {
{input_idx
}
}
}
}
Also see https://github.com/usebruno/bruno/issues/3019
PR - #5113 has been merged that fixes this issue. This will be available in our upcoming - v2.14.0 release scheduled to go out in last week of October