From 61c16930d9b156161611f1e337614050c9b8baf8 Mon Sep 17 00:00:00 2001 From: Abhishek Tiwari Date: Fri, 18 Oct 2024 21:06:16 +0000 Subject: [PATCH] Update blueprint metadata json schema for DisplayVariable_AlternateDefault value --- cli/bpmetadata/schema/gcp-blueprint-metadata.json | 4 +--- cli/bpmetadata/schema/generate.go | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cli/bpmetadata/schema/gcp-blueprint-metadata.json b/cli/bpmetadata/schema/gcp-blueprint-metadata.json index 979fcb0579e..2cb1d61944d 100644 --- a/cli/bpmetadata/schema/gcp-blueprint-metadata.json +++ b/cli/bpmetadata/schema/gcp-blueprint-metadata.json @@ -856,9 +856,7 @@ } ] }, - "value": { - "$ref": "#/$defs/Value" - } + "value": true }, "additionalProperties": false, "type": "object" diff --git a/cli/bpmetadata/schema/generate.go b/cli/bpmetadata/schema/generate.go index 3d350dbe570..9dadd2c6a28 100644 --- a/cli/bpmetadata/schema/generate.go +++ b/cli/bpmetadata/schema/generate.go @@ -57,6 +57,10 @@ func GenerateSchema() ([]byte, error) { if defExists { oDef.Properties.Set("type", jsonschema.TrueSchema) } + altDefaultDef, defExists := s.Definitions["DisplayVariable_AlternateDefault"] + if defExists { + altDefaultDef.Properties.Set("value", jsonschema.TrueSchema) + } sData, err := json.MarshalIndent(s, "", " ") if err != nil {