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

Support embedding variables in json files #117

Closed
k2tzumi opened this issue Aug 27, 2022 · 2 comments · Fixed by #132
Closed

Support embedding variables in json files #117

k2tzumi opened this issue Aug 27, 2022 · 2 comments · Fixed by #132
Labels
enhancement New feature or request

Comments

@k2tzumi
Copy link
Collaborator

k2tzumi commented Aug 27, 2022

Proposal

To allow variables to be embedded in json files for more flexibility as test data.

{
    "code": "{{ vars.code }}",
    "data": {
       "foo": "test",
      "bar": 1
   }
}

Use vars syntax to expand variables when reading json.

@k2tzumi k2tzumi added the enhancement New feature or request label Aug 27, 2022
@k1LoW
Copy link
Owner

k1LoW commented Aug 27, 2022

Very interesting 👍

I think the following implementation might be difficult

  • Expansion of Integer and Boolean types

@k2tzumi
Copy link
Collaborator Author

k2tzumi commented Aug 27, 2022

Expansion of Integer and Boolean types

I think I was limited to only within a string to expand a variable, so this problem is difficult.

Other tools seemed to have the same problem. 😓
https://community.postman.com/t/the-path-variable-var-needs-to-be-of-type-integer-but-we-found-var/12714

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

Successfully merging a pull request may close this issue.

2 participants