From 25e1c2b6a1a8b378c2b52e18129b46444d77f10e Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Mon, 21 Oct 2024 13:56:37 +0200 Subject: [PATCH] Add documentation for forbidden chars in env vars --- doc/openapi/firecrest-api.yaml | 22 ++++++++++++++++++++-- doc/openapi/firecrest-developers-api.yaml | 22 ++++++++++++++++++++-- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/doc/openapi/firecrest-api.yaml b/doc/openapi/firecrest-api.yaml index 7af222a9..d86ee858 100644 --- a/doc/openapi/firecrest-api.yaml +++ b/doc/openapi/firecrest-api.yaml @@ -1533,7 +1533,16 @@ paths: description: Name of the account associated to the user in the scheduler. If not set, the one incuded in the script is taken. env: type: string - description: serialized JSON dictionary (varName, value) to be loaded as environment variables for the job + description: >- + serialized JSON dictionary (varName, value) to be loaded as environment variables for the job. + If you need to include forbidden characters (e.g., <, |, etc.) in an environment variable, you can + use the following workaround: + + 1) encode the variable's value to Base64 before submitting the job + and + + 2) decode the variable's value within the job script by using a command like: + `export MY_VARIABLE=$(echo MY_VARIABLE | base64 --decode)`. required: - file responses: @@ -1600,7 +1609,16 @@ paths: description: Name of the account associated to the user in the scheduler. If not set, the one incuded in the script is taken. env: type: string - description: serialized JSON dictionary (varName, value) to be loaded as environment variables for the job + description: >- + serialized JSON dictionary (varName, value) to be loaded as environment variables for the job. + If you need to include forbidden characters (e.g., <, |, etc.) in an environment variable, you can + use the following workaround: + + 1) encode the variable's value to Base64 before submitting the job + and + + 2) decode the variable's value within the job script by using a command like: + `export MY_VARIABLE=$(echo MY_VARIABLE | base64 --decode)`. required: - targetPath responses: diff --git a/doc/openapi/firecrest-developers-api.yaml b/doc/openapi/firecrest-developers-api.yaml index d2319f88..cbb2084f 100644 --- a/doc/openapi/firecrest-developers-api.yaml +++ b/doc/openapi/firecrest-developers-api.yaml @@ -1521,7 +1521,16 @@ paths: description: Name of the account associated to the user in the scheduler. If not set, the one incuded in the script is taken. env: type: string - description: serialized JSON dictionary (varName, value) to be loaded as environment variables for the job + description: >- + serialized JSON dictionary (varName, value) to be loaded as environment variables for the job. + If you need to include forbidden characters (e.g., <, |, etc.) in an environment variable, you can + use the following workaround: + + 1) encode the variable's value to Base64 before submitting the job + and + + 2) decode the variable's value within the job script by using a command like: + `export MY_VARIABLE=$(echo MY_VARIABLE | base64 --decode)`. required: - file responses: @@ -1588,7 +1597,16 @@ paths: description: Name of the account associated to the user in the scheduler. If not set, the one incuded in the script is taken. env: type: string - description: serialized JSON dictionary (varName, value) to be loaded as environment variables for the job + description: >- + serialized JSON dictionary (varName, value) to be loaded as environment variables for the job. + If you need to include forbidden characters (e.g., <, |, etc.) in an environment variable, you can + use the following workaround: + + 1) encode the variable's value to Base64 before submitting the job + and + + 2) decode the variable's value within the job script by using a command like: + `export MY_VARIABLE=$(echo MY_VARIABLE | base64 --decode)`. required: - targetPath responses: