INNER CODE UNIT · Go
mergeFirstBranch
bjw-s-labs/helm-charts · tools/helm-schema-tools/internal/schema/schema.go:38
mergeFirstBranch := func(subs []*jsonschema.Schema) {
if len(subs) == 0 {
return
}
for k, v := range collectProps(subs[0], depth+1) {
if _, exists := props[k]; !exists {
props[k] = v
}
}
}
for _, sub := range schema.AllOf {
for k, v := range collectProps(sub, depth+1) {
if _, exists := props[k]; !exists {
props[k] = v
}
}
}