mirror of https://github.com/databricks/cli.git
new line for s
This commit is contained in:
parent
e55df7b207
commit
1dd399f3fe
|
@ -25,16 +25,19 @@ func addInterpolationPatterns(typ reflect.Type, s jsonschema.Schema) jsonschema.
|
|||
case jsonschema.ArrayType, jsonschema.ObjectType:
|
||||
// arrays and objects can have complex variable values specified.
|
||||
return jsonschema.Schema{
|
||||
AnyOf: []jsonschema.Schema{s, {
|
||||
Type: jsonschema.StringType,
|
||||
Pattern: interpolationPattern("var"),
|
||||
}},
|
||||
AnyOf: []jsonschema.Schema{
|
||||
s,
|
||||
{
|
||||
Type: jsonschema.StringType,
|
||||
Pattern: interpolationPattern("var"),
|
||||
}},
|
||||
}
|
||||
case jsonschema.IntegerType, jsonschema.NumberType, jsonschema.BooleanType:
|
||||
// primitives can have variable values, or references like ${bundle.xyz}
|
||||
// or ${workspace.xyz}
|
||||
return jsonschema.Schema{
|
||||
AnyOf: []jsonschema.Schema{s,
|
||||
AnyOf: []jsonschema.Schema{
|
||||
s,
|
||||
{Type: jsonschema.StringType, Pattern: interpolationPattern("resources")},
|
||||
{Type: jsonschema.StringType, Pattern: interpolationPattern("bundle")},
|
||||
{Type: jsonschema.StringType, Pattern: interpolationPattern("workspace")},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package generated
|
||||
package schema
|
||||
|
||||
import _ "embed"
|
||||
|
||||
//go:embed jsonschema.json
|
||||
var BundleSchema []byte
|
||||
var Bytes []byte
|
|
@ -3,7 +3,7 @@ package bundle
|
|||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/databricks/cli/bundle/generated"
|
||||
"github.com/databricks/cli/bundle/schema"
|
||||
"github.com/databricks/cli/cmd/root"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
@ -16,7 +16,7 @@ func newSchemaCommand() *cobra.Command {
|
|||
}
|
||||
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) error {
|
||||
_, err := cmd.OutOrStdout().Write(generated.BundleSchema)
|
||||
_, err := cmd.OutOrStdout().Write(schema.Bytes)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue