Skip to content

Fix scalar YAML aliases in loadYamlContent - #20151

Open
stephaniezyen with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-loadyamlcontent-scalar-alias
Open

Fix scalar YAML aliases in loadYamlContent#20151
stephaniezyen with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-loadyamlcontent-scalar-alias

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

loadYamlContent() returned BCP340 for valid YAML aliases targeting scalar values, despite supporting mapping aliases.

  • YAML parsing

    • Parse through SharpYaml’s document model before converting to an object.
    • Preserve reference handling while allowing resolved scalar aliases to be converted normally.
  • Regression coverage

    • Add unit coverage for scalar anchor/alias deserialization.
    • Add compilation and output evaluation coverage for loadYamlContent().
source: &CIDR 10.0.0.0/17
alias: *CIDR
{
  "source": "10.0.0.0/17",
  "alias": "10.0.0.0/17"
}

Co-authored-by: stephaniezyen <77693576+stephaniezyen@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix loadYamlContent issue with scalar YAML aliases in v0.46.1 Fix scalar YAML aliases in loadYamlContent Aug 5, 2026
Copilot AI requested a review from stephaniezyen August 5, 2026 20:26
@anthony-c-martin
Anthony Martin (anthony-c-martin) marked this pull request as ready for review August 5, 2026 22:23
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Test this change out locally with the following install scripts (Action run 31044003704)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 31044003704
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 31044003704"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 31044003704
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 31044003704"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

loadYamlContent still fails for scalar YAML aliases in v0.46.1 with BCP340

3 participants