From de71b431a42154e9733db3fc7a767cc38f914b72 Mon Sep 17 00:00:00 2001 From: Devaansh-Kumar Date: Mon, 9 Sep 2024 22:34:40 +0530 Subject: [PATCH] added a comment for excludeFromCRD tag --- pkg/generator/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/generator/main.go b/pkg/generator/main.go index 9d9fa7f234..1e3e87e622 100644 --- a/pkg/generator/main.go +++ b/pkg/generator/main.go @@ -222,6 +222,8 @@ func gatewayTweaks(channel string, props map[string]apiext.JSONSchemaProps) map[ jsonProps.Description = strings.ReplaceAll(jsonProps.Description, endTag, "") } + // Comments within "gateway:util:excludeFromCRD" tag is not included in the generated CRD and all trailing \n operators before + // and after the tags are removed and replaced with three \n operators. startTag = "" endTag = "" regexPattern = `\n*` + regexp.QuoteMeta(startTag) + `(?s:(.*?))` + regexp.QuoteMeta(endTag) + `\n*`