module foo { namespace "foo"; prefix foo; yang-version 1; revision "2016-03-01" { description "test"; } grouping grp { container con-grp { leaf l { type int16; } leaf leaf-ref { type leafref { path "../../con2/l2"; } } } } container root { uses grp; container con2 { leaf l2 { type binary; } } } augment "/root" { leaf leaf-ref-2 { type leaf-ref-type2; } } typedef leaf-ref-type2 { type leaf-ref-type; } typedef leaf-ref-type { type leafref { path "../con-grp/l"; } } }