We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3b7b09d + ea19139 commit 98028e3Copy full SHA for 98028e3
1 file changed
infra/scripts/validate_bicep_params.py
@@ -79,8 +79,10 @@ def parse_parameters_json(json_path: Path) -> list[str]:
79
"""Return the raw parameter key names (preserving whitespace) from a
80
parameters JSON file."""
81
text = json_path.read_text(encoding="utf-8-sig")
82
- # azd parameter files may use ${VAR=default} syntax which is not valid JSON.
83
- # Replace boolean-like defaults so json.loads doesn't choke.
+ # azd parameter files may include ${VAR} or ${VAR=default} placeholders inside
+ # string values. These are valid JSON strings, but we sanitize them so that
84
+ # json.loads remains resilient to azd-specific placeholders and any unusual
85
+ # default formats.
86
sanitized = re.sub(r'"\$\{[^}]+\}"', '"__placeholder__"', text)
87
try:
88
data = json.loads(sanitized)
0 commit comments