feat: enumerate all hierarchical paths for option's parents facet
1 file changed, 8 insertions(+), 5 deletions(-)
changed files
M internal/importer/options.go → internal/importer/options.go
@@ -172,14 +172,17 @@ if v, ok := x["example"].(map[string]any); ok { exampleDocs = i.convertDocsValue(v) } - var parents string - if len(loc) > 1 { - parents = strings.Join(loc[:len(loc)-1], ".") - } - var optionSet string + var parents []string if len(loc) >= 1 { + // Top-level parent -> optionSet optionSet = loc[0] + + for i := 1; i < len(loc); i++ { + parents = append(parents, + strings.Join(loc[:i], "."), + ) + } } // log.Debug("sending option", "name", kv.Key)