From 4dbc090cf3058fcf3b5a1f52522e77c080166ef2 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Wed, 4 Sep 2024 16:18:34 +0200 Subject: [PATCH] - --- bundle/config/target.go | 2 ++ bundle/schema/jsonschema.json | 50 ++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/bundle/config/target.go b/bundle/config/target.go index fc6ba7b5b..d261018dc 100644 --- a/bundle/config/target.go +++ b/bundle/config/target.go @@ -8,6 +8,8 @@ import ( type Mode string +type TargetVariable variable.Variable + // Target defines overrides for a single target. // This structure is recursively merged into the root configuration. type Target struct { diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index 2db1a5ab4..559218f17 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -1032,6 +1032,40 @@ } ] }, + "config.TargetVariable": { + "anyOf": [ + { + "type": "object", + "properties": { + "default": { + "$ref": "#/$defs/interface" + }, + "description": { + "$ref": "#/$defs/string" + }, + "lookup": { + "$ref": "#/$defs/github.com/databricks/cli/bundle/config/variable.Lookup" + }, + "type": { + "$ref": "#/$defs/github.com/databricks/cli/bundle/config/variable.VariableType" + } + }, + "additionalProperties": false + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + } + ] + }, "config.Workspace": { "anyOf": [ { @@ -5086,6 +5120,20 @@ "pattern": "\\$\\{(var(\\.[a-zA-Z]+([-_]?[a-zA-Z0-9]+)*(\\[[0-9]+\\])*)+)\\}" } ] + }, + "config.TargetVariable": { + "anyOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/github.com/databricks/cli/bundle/config.TargetVariable" + } + }, + { + "type": "string", + "pattern": "\\$\\{(var(\\.[a-zA-Z]+([-_]?[a-zA-Z0-9]+)*(\\[[0-9]+\\])*)*(\\[[0-9]+\\])*)\\}" + } + ] } } } @@ -5558,4 +5606,4 @@ } }, "additionalProperties": false -} \ No newline at end of file +}