Refactored total change counts

Design is more uniformed and standardized, patterns are bubbling up. I think we're ready to tackle the schema soon.

Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
Dave Shanley
2022-10-05 11:24:37 -04:00
parent 0b2c3c1201
commit 3649dc594f
11 changed files with 36 additions and 26 deletions

View File

@@ -66,6 +66,11 @@ func (ex *Example) Build(root *yaml.Node, idx *index.SpecIndex) error {
return nil
}
// GetExtensions will return Example extensions to satisfy the HasExtensions interface.
func (ex *Example) GetExtensions() map[low.KeyReference[string]]low.ValueReference[any] {
return ex.Extensions
}
// ExtractExampleValue will extract a primitive example value (if possible), or just the raw Value property if not.
func ExtractExampleValue(exp *yaml.Node) any {
if utils.IsNodeBoolValue(exp) {