Skip to content

Commit

Permalink
handle variable overrids
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-goenka committed Jul 5, 2024
1 parent 4390b83 commit e638f17
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/bundle/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/databricks/cli/bundle/config"
"github.com/databricks/cli/bundle/schema"
"github.com/databricks/cli/cmd/root"
"github.com/databricks/cli/libs/jsonschema"
"github.com/spf13/cobra"
)

Expand All @@ -30,6 +31,13 @@ func newSchemaCommand() *cobra.Command {
return err
}

// Target variable value overrides can be primitives, maps or sequences.
// Set an empty schema for them.
err = schema.SetByPath("targets.*.variables.*", jsonschema.Schema{})
if err != nil {
return err
}

// Print the JSON schema to stdout.
result, err := json.MarshalIndent(schema, "", " ")
if err != nil {
Expand Down

0 comments on commit e638f17

Please sign in to comment.