Hi guys!
Is there any way to escape environment variables?
For example, I have a POST method in which I need to specify a payload like this:
{
"jobs": [
{
"id": "Job1",
"logs": [],
"type": "pbs",
"resource": {
"queue": "batch",
"cmd": "qsub -d ~/{{kbaseDir}}/ ~/{{kbaseDir}}/{{u1}}/penguin.pbs -q {{kqueue}}"
}
}
],
"connections": []
}
where, in the jobs[0].resource.cmd property, I need to specify a string with curly brackets, but I don't want that they are interpreted as environment variables.
I have also tried to add the {% and %} escapes characters, but without success.
Any suggestion?
For Nunjucks templating, you can escape things with the {% raw %}...{% endraw %} tag.
"{% raw %}qsub -d ~/{{kbaseDir}}/ ~/{{kbaseDir}}/{{u1}}/penguin.pbs -q {{kqueue}}{% endraw %}"
Since this use case is so common, you can also disable rendering of the request body in the request settings (last option).

Most helpful comment
For Nunjucks templating, you can escape things with the
{% raw %}...{% endraw %}tag.Since this use case is so common, you can also disable rendering of the request body in the request settings (last option).