online-yaml-parser icon indicating copy to clipboard operation
online-yaml-parser copied to clipboard

Anchor and reference for same node not working

Open uber-cool opened this issue 5 years ago • 1 comments

Consider below YAML

- just: write some
- yaml:     
    node1:
      type: type1
      properties: &node1_prop
        role: management
        ip_version: ipv4

    node2:
      type: type2
      properties: &node2_prop *node1_prop 
      requirements:
        - dependency: node1

    node3:
      type: type3
      properties: *node2_prop
      requirements:
        - dependency: node2

Parsing above throws error, while it should be parsed successfully.

uber-cool avatar Apr 01 '19 07:04 uber-cool

That's invalid YAML. You cannot put another anchor on an alias.

perlpunk avatar May 20 '24 19:05 perlpunk