@@ -120,6 +120,7 @@ export STRING_VALUE="value"
120
120
export BOOL_VALUE=" true"
121
121
export INT_VALUE=" 1"
122
122
export FLOAT_VALUE=" 1.1"
123
+ export HEX_VALUE=" 0xdeadbeef" # A valid integer value written in hexadecimal
123
124
export INVALID_MAP_VALUE=" value\nkey:value" # An invalid attempt to inject a map key into the YAML
124
125
export DO_NOT_REPLACE_ME=" Never use this value" # An unused environment variable
125
126
export REPLACE_ME=' ${DO_NOT_REPLACE_ME}' # A valid replacement text, used verbatim, not replaced with "Never use this value"
@@ -130,9 +131,11 @@ string_key: ${STRING_VALUE} # Valid reference to STRIN
130
131
env_string_key : ${env:STRING_VALUE} # Valid reference to STRING_VALUE
131
132
other_string_key : " ${STRING_VALUE}" # Valid reference to STRING_VALUE inside double quotes
132
133
another_string_key : " ${BOOL_VALUE}" # Valid reference to BOOL_VALUE inside double quotes
134
+ string_key_with_quoted_hex_value : " ${HEX_VALUE}" # Valid reference to HEX_VALUE inside double quotes
133
135
yet_another_string_key : ${INVALID_MAP_VALUE} # Valid reference to INVALID_MAP_VALUE, but YAML structure from INVALID_MAP_VALUE MUST NOT be injected
134
136
bool_key : ${BOOL_VALUE} # Valid reference to BOOL_VALUE
135
137
int_key : ${INT_VALUE} # Valid reference to INT_VALUE
138
+ int_key_with_unquoted_hex_value : ${HEX_VALUE} # Valid reference to HEX_VALUE without quotes
136
139
float_key : ${FLOAT_VALUE} # Valid reference to FLOAT_VALUE
137
140
combo_string_key : foo ${STRING_VALUE} ${FLOAT_VALUE} # Valid reference to STRING_VALUE and FLOAT_VALUE
138
141
string_key_with_default : ${UNDEFINED_KEY:-fallback} # UNDEFINED_KEY is not defined but a default value is included
@@ -145,19 +148,21 @@ recursive_key: ${REPLACE_ME} # Valid reference to REPLA
145
148
Environment variable substitution results in the following YAML:
146
149
147
150
``` yaml
148
- string_key : value # Interpreted as type string, tag URI tag:yaml.org,2002:str
149
- env_string_key : value # Interpreted as type string, tag URI tag:yaml.org,2002:str
150
- other_string_key : " value" # Interpreted as type string, tag URI tag:yaml.org,2002:str
151
- another_string_key : " true" # Interpreted as type string, tag URI tag:yaml.org,2002:str
152
- yet_another_string_key : " value\n key:value" # Interpreted as type string, tag URI tag:yaml.org,2002:str
153
- bool_key : true # Interpreted as type bool, tag URI tag:yaml.org,2002:bool
154
- int_key : 1 # Interpreted as type int, tag URI tag:yaml.org,2002:int
155
- float_key : 1.1 # Interpreted as type float, tag URI tag:yaml.org,2002:float
156
- combo_string_key : foo value 1.1 # Interpreted as type string, tag URI tag:yaml.org,2002:str
157
- string_key_with_default : fallback # Interpreted as type string, tag URI tag:yaml.org,2002:str
158
- undefined_key : # Interpreted as type null, tag URI tag:yaml.org,2002:null
159
- ${STRING_VALUE} : value # Interpreted as type string, tag URI tag:yaml.org,2002:str
160
- recursive_key : ${DO_NOT_REPLACE_ME} # Interpreted as type string, tag URI tag:yaml.org,2002:str
151
+ string_key : value # Interpreted as type string, tag URI tag:yaml.org,2002:str
152
+ env_string_key : value # Interpreted as type string, tag URI tag:yaml.org,2002:str
153
+ other_string_key : " value" # Interpreted as type string, tag URI tag:yaml.org,2002:str
154
+ another_string_key : " true" # Interpreted as type string, tag URI tag:yaml.org,2002:str
155
+ string_key_with_quoted_hex_value : " 0xdeadbeef" # Interpreted as type string, tag URI tag:yaml.org,2002:str
156
+ yet_another_string_key : " value\n key:value" # Interpreted as type string, tag URI tag:yaml.org,2002:str
157
+ bool_key : true # Interpreted as type bool, tag URI tag:yaml.org,2002:bool
158
+ int_key : 1 # Interpreted as type int, tag URI tag:yaml.org,2002:int
159
+ int_key_with_unquoted_hex_value : 3735928559 # Interpreted as type int, tag URI tag:yaml.org,2002:int
160
+ float_key : 1.1 # Interpreted as type float, tag URI tag:yaml.org,2002:float
161
+ combo_string_key : foo value 1.1 # Interpreted as type string, tag URI tag:yaml.org,2002:str
162
+ string_key_with_default : fallback # Interpreted as type string, tag URI tag:yaml.org,2002:str
163
+ undefined_key : # Interpreted as type null, tag URI tag:yaml.org,2002:null
164
+ ${STRING_VALUE} : value # Interpreted as type string, tag URI tag:yaml.org,2002:str
165
+ recursive_key : ${DO_NOT_REPLACE_ME} # Interpreted as type string, tag URI tag:yaml.org,2002:str
161
166
` ` `
162
167
163
168
## SDK Configuration
0 commit comments