fix: Allow nodes with only description

This commit is contained in:
Ilya Kuznetsov 2025-01-10 19:57:02 +01:00
parent c546604cc4
commit 90cafad8c8
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ func getNodes(s jsonschema.Schema, refs map[string]jsonschema.Schema, customFiel
node.ArrayItemAttributes = getAttributes(arrayItemType.Properties, refs, customFields, k)
}
isEmpty := len(node.Attributes) == 0 && len(node.ObjectKeyAttributes) == 0 && len(node.ArrayItemAttributes) == 0
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)

View File

@ -480,7 +480,7 @@ github.com/databricks/cli/bundle/config/variable.Variable:
"description": |-
The name of the alert, cluster_policy, cluster, dashboard, instance_pool, job, metastore, pipeline, query, service_principal, or warehouse object for which to retrieve an ID.
"markdown_description": |-
The name of the `alert`, `cluster_policy`, `cluster`, `dashboard`, `instance_pool`, `job`, `metastore`, `pipeline`, `query`, `service_principal`, or `warehouse` object for which to retrieve an ID."
The name of the `alert`, `cluster_policy`, `cluster`, `dashboard`, `instance_pool`, `job`, `metastore`, `pipeline`, `query`, `service_principal`, or `warehouse` object for which to retrieve an ID.
"type":
"description": |-
The type of the variable.