Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,13 @@
"script": "shellscript",
"script.prepare": "shellscript",
"script.cleanup": "shellscript"
},
"yaml.schemas": {
"./bundle/schema/jsonschema.json": [
"databricks.yml",
"databricks.yaml",
"bundle.yml",
"bundle.yaml",
]
}
}
48 changes: 46 additions & 2 deletions bundle/docsgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,57 @@ func assignAnnotation(s *jsonschema.Schema, a annotation.Descriptor) {
s.Deprecated = true
s.DeprecationMessage = a.DeprecationMessage
}
if a.Preview == "PRIVATE" {
s.DoNotSuggest = true
if a.Preview != "" {
Copy link
Copy Markdown
Contributor

@ilyakuz-db ilyakuz-db Jun 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shreyas-goenka do we still use docsgen?

s.Preview = a.Preview
if a.Preview == "PRIVATE" {
s.DoNotSuggest = true
}
}
if a.LaunchStage != "" {
s.LaunchStage = a.LaunchStage
switch a.LaunchStage {
case "PRIVATE_PREVIEW", "DEVELOPMENT":
s.DoNotSuggest = true
}
}
if a.OutputOnly != nil && *a.OutputOnly {
s.DoNotSuggest = true
}

if tag := previewTag(a.LaunchStage, a.Preview); tag != "" {
if s.Description != "" {
s.Description = tag + " " + s.Description
} else {
s.Description = tag
}
}
}

// previewTag returns the human-readable launch-stage prefix to prepend to a
// field's description. LaunchStage is preferred over Preview because it carries
// the richer signal (Beta vs. Public Preview), falling back to the legacy
// Preview field when only that's available. DEVELOPMENT is intentionally not
// surfaced — those fields are filtered out at extraction time, so reaching
// this code path with DEVELOPMENT means something is wrong; the safe default
// is to emit no tag rather than leak a [Development] marker into the docs.
//
// Keep this in sync with previewTag in bundle/internal/schema/annotations.go.
func previewTag(launchStage, preview string) string {
switch launchStage {
case "PRIVATE_PREVIEW":
return "[Private Preview]"
case "PUBLIC_BETA":
return "[Public Beta]"
case "PUBLIC_PREVIEW":
return "[Public Preview]"
}
switch preview {
case "PRIVATE":
return "[Private Preview]"
case "PUBLIC":
return "[Public Preview]"
}
return ""
}

func fillTemplateVariables(s string) string {
Expand Down
10 changes: 9 additions & 1 deletion bundle/docsgen/output/reference.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading