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