fix: Few links updates

This commit is contained in:
Ilya Kuznetsov 2025-01-13 15:16:47 +01:00
parent 5fb4fa000b
commit ad81e1f0af
3 changed files with 20 additions and 15 deletions

View File

@ -123,7 +123,8 @@ func buildMarkdown(nodes []rootNode, outputFile, header string) error {
m = m.LF()
if len(node.ObjectKeyAttributes) > 0 {
n := removePluralForm(node.Title)
n := pickLastWord(node.Title)
n = removePluralForm(n)
m = m.CodeBlocks("yaml", fmt.Sprintf("%ss:\n <%s-name>:\n <%s-field-name>: <%s-field-value>", n, n, n, n))
m = m.LF()
m = buildAttributeTable(m, node.ObjectKeyAttributes)
@ -151,6 +152,11 @@ func buildMarkdown(nodes []rootNode, outputFile, header string) error {
return nil
}
func pickLastWord(s string) string {
words := strings.Split(s, ".")
return words[len(words)-1]
}
// Build a custom table which we use in Databricks website
func buildCustomAttributeTable(m *md.Markdown, attributes []attributeNode) *md.Markdown {
m = m.LF()

View File

@ -1,7 +1,6 @@
package main
import (
"fmt"
"sort"
"strings"
@ -73,7 +72,7 @@ func getNodes(s jsonschema.Schema, refs map[string]jsonschema.Schema, customFiel
if len(node.Example) == 0 {
node.Example = getExample(objectKeyType)
}
prefix := fmt.Sprintf("%s.<%s-name>", k, removePluralForm(k))
prefix := k + ".<name>"
node.ObjectKeyAttributes = getAttributes(objectKeyType.Properties, refs, customFields, prefix)
rootProps = append(rootProps, extractNodes(prefix, objectKeyType.Properties, refs, customFields)...)
}

View File

@ -143,57 +143,57 @@ github.com/databricks/cli/bundle/config.Resources:
"description": |-
The cluster definitions for the bundle, where each key is the name of a cluster.
"markdown_description": |-
The cluster definitions for the bundle, where each key is the name of a cluster. See [_](/dev-tools/bundles/resources.md#cluster)
The cluster definitions for the bundle, where each key is the name of a cluster. See [_](/dev-tools/bundles/resources.md#clusters)
"dashboards":
"description": |-
The dashboard definitions for the bundle, where each key is the name of the dashboard.
"markdown_description": |-
The dashboard definitions for the bundle, where each key is the name of the dashboard. See [_](/dev-tools/bundles/resources.md#dashboard)
The dashboard definitions for the bundle, where each key is the name of the dashboard. See [_](/dev-tools/bundles/resources.md#dashboards)
"experiments":
"description": |-
The experiment definitions for the bundle, where each key is the name of the experiment.
"markdown_description": |-
The experiment definitions for the bundle, where each key is the name of the experiment. See [_](/dev-tools/bundles/resources.md#experiment)
The experiment definitions for the bundle, where each key is the name of the experiment. See [_](/dev-tools/bundles/resources.md#experiments)
"jobs":
"description": |-
The job definitions for the bundle, where each key is the name of the job.
"markdown_description": |-
The job definitions for the bundle, where each key is the name of the job. See [_](/dev-tools/bundles/resources.md#job)
The job definitions for the bundle, where each key is the name of the job. See [_](/dev-tools/bundles/resources.md#jobs)
"model_serving_endpoints":
"description": |-
The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint.
"markdown_description": |-
The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. See [_](/dev-tools/bundles/resources.md#model_serving_endpoint)
The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. See [_](/dev-tools/bundles/resources.md#model_serving_endpoints)
"models":
"description": |-
The model definitions for the bundle, where each key is the name of the model.
"markdown_description": |-
The model definitions for the bundle, where each key is the name of the model. See [_](/dev-tools/bundles/resources.md#model-legacy)
The model definitions for the bundle, where each key is the name of the model. See [_](/dev-tools/bundles/resources.md#models)
"pipelines":
"description": |-
The pipeline definitions for the bundle, where each key is the name of the pipeline.
"markdown_description": |-
The pipeline definitions for the bundle, where each key is the name of the pipeline. See [_](/dev-tools/bundles/resources.md#pipeline)
The pipeline definitions for the bundle, where each key is the name of the pipeline. See [_](/dev-tools/bundles/resources.md#pipelines)
"quality_monitors":
"description": |-
The quality monitor definitions for the bundle, where each key is the name of the quality monitor.
"markdown_description": |-
The quality monitor definitions for the bundle, where each key is the name of the quality monitor. See [_](/dev-tools/bundles/resources.md#quality-monitor)
The quality monitor definitions for the bundle, where each key is the name of the quality monitor. See [_](/dev-tools/bundles/resources.md#quality_monitors)
"registered_models":
"description": |-
The registered model definitions for the bundle, where each key is the name of the <UC> registered model.
"markdown_description": |-
The registered model definitions for the bundle, where each key is the name of the <UC> registered model. See [_](/dev-tools/bundles/resources.md#registered-model)
The registered model definitions for the bundle, where each key is the name of the <UC> registered model. See [_](/dev-tools/bundles/resources.md#registered_models)
"schemas":
"description": |-
The schema definitions for the bundle, where each key is the name of the schema.
"markdown_description": |-
The schema definitions for the bundle, where each key is the name of the schema. See [_](/dev-tools/bundles/resources.md#schema)
The schema definitions for the bundle, where each key is the name of the schema. See [_](/dev-tools/bundles/resources.md#schemas)
"volumes":
"description": |-
The volume definitions for the bundle, where each key is the name of the volume.
"markdown_description": |-
The volume definitions for the bundle, where each key is the name of the volume. See [_](/dev-tools/bundles/resources.md#volume)
The volume definitions for the bundle, where each key is the name of the volume. See [_](/dev-tools/bundles/resources.md#volumes)
github.com/databricks/cli/bundle/config.Root:
"artifacts":
"description": |-
@ -253,7 +253,7 @@ github.com/databricks/cli/bundle/config.Root:
```yaml
resources:
<resource-type>s:
<resource-type>:
<resource-name>:
<resource-field-name>: <resource-field-value>
```