-
Notifications
You must be signed in to change notification settings - Fork 457
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
Use of file variables in file variables only works if declarations are in reverse #208
Comments
@SimonDever actually it just happens to work. We don't support for variable value references other variables, the reason you work is related to current variable resolving logic in code. I will check if any file variables exist in declaration order, so in your case, I found calendar there, I will replace the calendar in request by its value, which introduces a new variable start. And the resolving logic continues, the next checking variable is start, and it's there, I replace it too. That's the reason why it works. I will modify the implementation later. |
Modify to remove the ability to use variables in other variables or modify to be able to declare them in the reverse order as well? |
@SimonDever I am planning the feature that the actual value of a file variable can reference other request variables and file variables. |
Referencing environment variables from a file variable used to work for me. Looks like something in 2018/6/28 release broke it. Would be great to see it working again. |
@vladvino I will fix this ASAP. |
@Huachao Is there an issue for the feature enhancement of reusing one file variable in another file variable? |
@mchelen I am afraid not. And I will implement the feature that file variables can depend on any custom variables(environment, file and request variables) finally. |
Would/Could this also support storing "resolved" dynamic variables in variables? I would like to store a date in a variable so it can be used multiple times in an array of objects being posted
So it could be used in a post like the following [
{
"firstName": "joe",
"enteredDate": "{{enteredDate}}"
},
{
"firstName": "bob",
"enteredDate": "{{enteredDate}}",
}
] |
@schallm Thanks for your suggestion. The file variables definition can already support referencing request variables, and allowing supporting other types of variables like |
@SimonDever @vladvino @mchelen @Mellbourn @schallm I have implemented the feature that file variables can reference other file variables. And the work that references environment variables and system variables is still WIP. |
Do you have issues open for those other things mentioned here and can I close this or do you want to keep it open until the environment variables/system variables work is complete? |
Let's keep it open, I will finally close this issue before next release |
@SimonDever @vladvino @mchelen @Mellbourn @schallm I have implemented the feature that file variables can reference file/system/request/environment variables. I will publish this feature in next release |
@SimonDever @vladvino @mchelen @Mellbourn @schallm you can try the latest version 0.20.4 to verify |
I can confirm my use case is now supported. One interesting/awesome thing is that the dynamic variables are re-evaluated each time "Send Request" is clicked. So in my example above, Thanks for implementing this feature! |
Steps to Reproduce:
lidarr.http
:@start
and@end
variables to be above the@calendar
variable like this:I am not terribly bothered by this now I've figured out a way around it but it isn't obvious as to why it works only like this. I'm not sure using variables in variables was even mentioned in any documentation I found. Not sure if it's relevant but the generated URL has also swapped the order of query parameters.
The text was updated successfully, but these errors were encountered: