insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Kebab-case environment variable is NaN

Open UAce opened this issue 6 years ago • 3 comments

I created an environment variable in kebab-case and was not able to access it.

Steps to reproduce the behavior:

  1. Add an environment variable in kebab-case
  2. Use it in a request and see the preview is NaN

Expected behavior If kebab-case is not allowed, highlight it as a syntax mistake, else show the correct value

Screenshots image image

Context OS: Ubuntu 18.04.3 LTS Insomnia v2020.3.3

UAce avatar Jul 13 '20 17:07 UAce

Ah yes, the dreadful dash problem. There is currently a warning that appears for top-level keys, but it looks like it does not detect nested ones.

image

An actual inline lint message (as you suggest) would be much nicer for this, as it would be hard to miss too.

gschier avatar Jul 13 '20 18:07 gschier

Looks like https://github.com/Kong/insomnia/issues/2684 will solve this?

johanhammar avatar Oct 05 '20 09:10 johanhammar

Nice find @johanhammar. Yes, sort of. #2684 addresses warnings for nested keys (like in the description above), but #2601 actually added support for kebab-case variables recently, so it is no longer invalid.

I'm going to close this as resolved with #2601. 😄 It will be published with the next beta/stable release.

develohpanda avatar Oct 06 '20 07:10 develohpanda