We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Conditional random choice is not easy. All possibilities have to be choice and the template switch to the valid choice.
For example to choice name by gender :
- selector: jsonpath: "name_F" mask: add : "" - selector: jsonpath: "name_F" mask: randomChoiceInURI : "file://names_F.txt" - selector: jsonpath: "name_M" mask: add : "" - selector: jsonpath: "name_M" mask: randomChoiceInURI : "file://names_M.txt" - selector: jsonpath: "name" mask: template: |- {{if .gender "F"}}{{.name_ F}}{{else}}{{.name_M}}{{end}} # Remove temporaries fields - selector: jsonpath: "name_F" mask: remove : true - selector: jsonpath: "name_M" mask: remove : true
This is a pain for a two categories choice and is unusable for hundred categories choice.
This issue propose to use template in uri path.
For example :
- selector: jsonpath: "name" mask: randomChoiceInUri: "file://names_{{.gender}}.txt
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Problem
Conditional random choice is not easy. All possibilities have to be choice and the template switch to the valid choice.
For example to choice name by gender :
This is a pain for a two categories choice and is unusable for hundred categories choice.
Solution
This issue propose to use template in uri path.
For example :
The text was updated successfully, but these errors were encountered: