Cleanup record encoding logic, add tests

This commit is contained in:
Tomaž Jerman
2023-03-17 10:58:46 +01:00
parent 1e6cbf6123
commit a0e25b457f
18 changed files with 621 additions and 87 deletions
@@ -30,6 +30,7 @@ type (
YamlDecoder struct{}
documentContext struct {
references map[string]string
parentIdent envoyx.Identifiers
}
auxYamlDoc struct {
nodes envoyx.NodeSet
@@ -393,6 +394,9 @@ func (d *auxYamlDoc) unmarshal{{ .expIdent }}Node(dctx documentContext, n *yaml.
return
}
// Make parent identifiers available through the dctx
dctx.parentIdent = ii
{{ if eq $cmpIdent "compose" }}
// Handle global namespace reference which can be provided as the doc. context
//