From 1ba1f0956ee8a622dadd2f34a0ac707a0bcd9c50 Mon Sep 17 00:00:00 2001 From: Fabian Kramm Date: Thu, 22 Aug 2024 17:25:47 +0200 Subject: [PATCH] refactor: allow empty path --- chart/values.schema.json | 5 +---- config/config.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/chart/values.schema.json b/chart/values.schema.json index b18f3ce8b..22f01d2c9 100755 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -3093,10 +3093,7 @@ } }, "additionalProperties": false, - "type": "object", - "required": [ - "path" - ] + "type": "object" }, "TranslatePatchExpression": { "oneOf": [ diff --git a/config/config.go b/config/config.go index 876e8044b..b5de05066 100644 --- a/config/config.go +++ b/config/config.go @@ -448,7 +448,7 @@ type SyncToHostCustomResourceDefinition struct { type TranslatePatch struct { // Path is the path within the patch to target. If the path is not found within the patch, the patch is not applied. - Path string `json:"path,omitempty" jsonschema:"required"` + Path string `json:"path,omitempty"` // Expression transforms the value according to the given JavaScript expression. Expression *TranslatePatchExpression `json:"expression,omitempty" jsonschema:"oneof_required=expression"`