mirror of https://github.com/databricks/cli.git
fix: Add field-name for some properties
This commit is contained in:
parent
fd88e4c97a
commit
5fb4fa000b
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -72,8 +73,9 @@ func getNodes(s jsonschema.Schema, refs map[string]jsonschema.Schema, customFiel
|
||||||
if len(node.Example) == 0 {
|
if len(node.Example) == 0 {
|
||||||
node.Example = getExample(objectKeyType)
|
node.Example = getExample(objectKeyType)
|
||||||
}
|
}
|
||||||
node.ObjectKeyAttributes = getAttributes(objectKeyType.Properties, refs, customFields, k)
|
prefix := fmt.Sprintf("%s.<%s-name>", k, removePluralForm(k))
|
||||||
rootProps = append(rootProps, extractNodes(k, objectKeyType.Properties, refs, customFields)...)
|
node.ObjectKeyAttributes = getAttributes(objectKeyType.Properties, refs, customFields, prefix)
|
||||||
|
rootProps = append(rootProps, extractNodes(prefix, objectKeyType.Properties, refs, customFields)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if v.Items != nil {
|
if v.Items != nil {
|
||||||
|
|
Loading…
Reference in New Issue