Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Generate Code" not working with httpyac.environmentVariables in VS Code Settings #221

Closed
bohni opened this issue Sep 15, 2023 · 3 comments

Comments

@bohni
Copy link

bohni commented Sep 15, 2023

When defining variables in VS Code User Settings "Generate Code" does not work and instead shows a popup with message
ReferenceError: userVariable is not defined at Object.userJS

User Settings or Workspace Settings (.vscode/settings.json )

{
    "httpyac.environmentVariables": {
        "$shared" : {
            "codeVariable": "codeVariable"
        }
    }
}

.httpyac.config.js

module.exports = {
    "environments": {
      "$shared": {
        "sharedVariable": "sharedVariable",
        "baseUrl": "http://httpbin.org/anything"
      }
    }
}

error.http

### Without VS Code User Settings
GET {{baseUrl}}?param={{sharedVariable}}

### With  VS Code User Settings
GET {{baseUrl}}?param={{codeVariable}}
@bohni bohni changed the title "Generate Code" not working with httpyac.environmentVariables in VS Code User Settings "Generate Code" not working with httpyac.environmentVariables in VS Code Settings Sep 15, 2023
@AnWeber
Copy link
Owner

AnWeber commented Sep 15, 2023

fixed with v6.6.6

@AnWeber AnWeber closed this as completed Sep 15, 2023
@bohni
Copy link
Author

bohni commented Sep 15, 2023

Thanks for those quick fixes! And for that great tool!

@AnWeber
Copy link
Owner

AnWeber commented Sep 15, 2023

You are Welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants