From 90cafad8c8685fe16e070af86bdccd41d98359a6 Mon Sep 17 00:00:00 2001 From: Ilya Kuznetsov Date: Fri, 10 Jan 2025 19:57:02 +0100 Subject: [PATCH] fix: Allow nodes with only description --- bundle/internal/docs/nodes.go | 2 +- bundle/internal/schema/annotations.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle/internal/docs/nodes.go b/bundle/internal/docs/nodes.go index 4047a690b..4507de08a 100644 --- a/bundle/internal/docs/nodes.go +++ b/bundle/internal/docs/nodes.go @@ -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) diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index 8ac789cc7..6b5d873b3 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -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.