diff --git a/bundle/internal/annotation/descriptor.go b/bundle/internal/annotation/descriptor.go new file mode 100644 index 000000000..26c1a0b06 --- /dev/null +++ b/bundle/internal/annotation/descriptor.go @@ -0,0 +1,12 @@ +package annotation + +type Descriptor struct { + Description string `json:"description,omitempty"` + MarkdownDescription string `json:"markdown_description,omitempty"` + Title string `json:"title,omitempty"` + Default any `json:"default,omitempty"` + Enum []any `json:"enum,omitempty"` + MarkdownExamples string `json:"markdown_examples,omitempty"` +} + +const Placeholder = "PLACEHOLDER" diff --git a/bundle/internal/annotation/main.go b/bundle/internal/annotation/file.go similarity index 56% rename from bundle/internal/annotation/main.go rename to bundle/internal/annotation/file.go index 0053e16c9..0317f441a 100644 --- a/bundle/internal/annotation/main.go +++ b/bundle/internal/annotation/file.go @@ -10,21 +10,11 @@ import ( "github.com/databricks/cli/libs/dyn/yamlloader" ) -type Descriptor struct { - Description string `json:"description,omitempty"` - MarkdownDescription string `json:"markdown_description,omitempty"` - Title string `json:"title,omitempty"` - Default any `json:"default,omitempty"` - Enum []any `json:"enum,omitempty"` - MarkdownExamples string `json:"markdown_examples,omitempty"` -} - -/** - * Parsed file with annotations, expected format: - * github.com/databricks/cli/bundle/config.Bundle: - * cluster_id: - * description: "Description" - */ +// Parsed file with annotations, expected format: +// github.com/databricks/cli/bundle/config.Bundle: +// +// cluster_id: +// description: "Description" type File map[string]map[string]Descriptor func LoadAndMerge(sources []string) (File, error) { @@ -52,5 +42,3 @@ func LoadAndMerge(sources []string) (File, error) { } return data, nil } - -const Placeholder = "PLACEHOLDER"