feat: added keyword codec (partially works)

This commit is contained in:
2025-08-19 19:06:08 +02:00
parent 210b31aef8
commit 69c2550f44
24 changed files with 964 additions and 80 deletions

View File

@@ -18,16 +18,24 @@ func Yaml(input string, block template.Block) (value any, error error) {
var out any
for _, f := range block.Fields {
if f.Hidden {
if f.Path == "@schema" {
continue
}
if f.CodecType == template.CodecConst {
if f.Value != nil {
out = utils.SetPathValue(f.Path, f.Value, out)
}
} else {
if value, ok := res[f.Path]; ok {
out = utils.SetPathValue(f.Path, value, out)
continue
}
if value, ok := renderUtils.GetValueFromPath(res, f.Path); ok {
out = utils.SetPathValue(f.Path, value, out)
continue
}
}
}