mirror of https://github.com/databricks/cli.git
fix: Allow empty fields
This commit is contained in:
parent
c88498eb56
commit
3e0d2324b5
|
@ -82,12 +82,8 @@ func getNodes(s jsonschema.Schema, refs map[string]jsonschema.Schema, customFiel
|
||||||
node.ArrayItemAttributes = getAttributes(arrayItemType.Properties, refs, customFields, k)
|
node.ArrayItemAttributes = getAttributes(arrayItemType.Properties, refs, customFields, k)
|
||||||
}
|
}
|
||||||
|
|
||||||
isEmpty := node.Description == "" && len(node.Attributes) == 0 && len(node.ObjectKeyAttributes) == 0 && len(node.ArrayItemAttributes) == 0
|
|
||||||
shouldAddNode := !isEmpty || node.TopLevel
|
|
||||||
if shouldAddNode {
|
|
||||||
nodes = append(nodes, node)
|
nodes = append(nodes, node)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
sort.Slice(nodes, func(i, j int) bool {
|
sort.Slice(nodes, func(i, j int) bool {
|
||||||
return nodes[i].Title < nodes[j].Title
|
return nodes[i].Title < nodes[j].Title
|
||||||
|
|
Loading…
Reference in New Issue