Large update to support v3 rendering.

This commit is contained in:
Dave Shanley
2023-03-11 15:43:32 -05:00
parent 000eada3f4
commit 3101a7c9b7
65 changed files with 605 additions and 133 deletions

View File

@@ -23,6 +23,7 @@ type Example struct {
Value low.NodeReference[any]
ExternalValue low.NodeReference[string]
Extensions map[low.KeyReference[string]]low.ValueReference[any]
*low.Reference
}
// FindExtension returns a ValueReference containing the extension value, if found.
@@ -59,6 +60,7 @@ func (ex *Example) Hash() [32]byte {
// Build extracts extensions and example value
func (ex *Example) Build(root *yaml.Node, idx *index.SpecIndex) error {
ex.Reference = new(low.Reference)
ex.Extensions = low.ExtractExtensions(root)
_, ln, vn := utils.FindKeyNodeFull(ValueLabel, root.Content)