You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Author a deployment.template.json file that contains environment variable placeholders not enclosed in quotes. For example, the properties.desired section might contain something like this: "boolean_value": $ENV_VAR_THAT_CONTAINS_BOOLEAN,
Author a .env file that defines this environment variable to be a JSON boolean value: ENV_VAR_THAT_CONTAINS_BOOLEAN=true
Run iotedgedev genconfig --file deployment.template.json
Expected:
Generates deployment.json file that contains something like "boolean_value": true,, which is valid JSON.
Actual:
Tool aborts with an error like ERROR: Expecting value: line xxx column yyy (char zzz)
This used to work fine with version 2.0.2.
The text was updated successfully, but these errors were encountered:
Hi @yasufs This error will be fixed in next release. In 2.1.0 we added schema validations for deployment.template.json and the generated deployment.json. The error is because your deployment.template.json is not a valid json due to the use of environment variable. You can install v2.0.2 to skip the validations temporary.
By the way, environment variables are always strings. The tool won't prevent you from using environment variables as other types, but it's not a best practice.
Steps to Reproduce:
"boolean_value": $ENV_VAR_THAT_CONTAINS_BOOLEAN,
ENV_VAR_THAT_CONTAINS_BOOLEAN=true
iotedgedev genconfig --file deployment.template.json
Expected:
Generates deployment.json file that contains something like
"boolean_value": true,
, which is valid JSON.Actual:
Tool aborts with an error like
ERROR: Expecting value: line xxx column yyy (char zzz)
This used to work fine with version 2.0.2.
The text was updated successfully, but these errors were encountered: