thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

System Variable Detected as a Bad String in Editor

Open rizkimhd opened this issue 2 years ago • 4 comments

Describe the bug

When I use system variable the vs code showing error sign

To Reproduce

Utilize system variable in the JSON request body Screen Shot 2022-03-25 at 16 50 08

Expected behavior

There should be detected as a bad string error warning, because the syntax is a correct system variable as mentioned in thunder client documentations Screen Shot 2022-03-25 at 16 53 30

Platform:

  • OS: MacOS Monterey
  • vscode version: 1.65.2
  • extension version: v.1.14.0

Solution:

rizkimhd avatar Mar 25 '22 09:03 rizkimhd

Hi @rizkimhd thanks for the feedback.

It’s just complaining that it is not valid json, though technically it’s correct,

I need to customize the json validator to support this syntax which is in roadmap.

for now you can ignore that warning, when you run request it should work correctly.

rangav avatar Mar 25 '22 10:03 rangav

Can this feature be made open for contribution?

Would be great to extend this features capabilities.

One of the things I have in mind is being to use something like {{#date+/-1day, 'X'}} or {{#date+/-1hour}}. Basically adding the ability to auto-generate a timestamp which is +/- of the current timestamp. Apologies if this is already possible or you think it will be difficult to implement. But I'd like to give it a go

haffi96 avatar Jul 08 '22 17:07 haffi96

@haffi96 thanks for feedback, can you please a new issue for this feature request.

rangav avatar Jul 08 '22 17:07 rangav

@haffi96 thanks for feedback, can you please a new issue for this feature request.

Thanks. https://github.com/rangav/thunder-client-support/issues/656 Here you go

haffi96 avatar Jul 08 '22 19:07 haffi96

We have fixed the JSON validation syntax error for environment variables in v2.8.0

See all features released https://github.com/rangav/thunder-client-support/releases/tag/v2.8.0

Please let me know your feedback.

rangav avatar Jul 11 '23 20:07 rangav