From c80d809c9d7e8adc2d1e72291ebe7dc081df5df9 Mon Sep 17 00:00:00 2001 From: Sanjay Kumar Date: Mon, 29 Jul 2024 17:30:27 +0530 Subject: [PATCH] Backport for 1373 to 2.x Signed-off-by: Sanjay Kumar --- .../UpdateAutoFollowPatternRequest.kt | 8 +++- .../replication/util/ValidationUtil.kt | 20 +++++++++ .../integ/rest/UpdateAutoFollowPatternIT.kt | 45 +++++++++++++++++++ 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt b/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt index 165ede8b..7ee68188 100644 --- a/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt +++ b/src/main/kotlin/org/opensearch/replication/action/autofollow/UpdateAutoFollowPatternRequest.kt @@ -14,6 +14,7 @@ package org.opensearch.replication.action.autofollow import org.opensearch.replication.action.index.ReplicateIndexRequest import org.opensearch.replication.metadata.store.KEY_SETTINGS import org.opensearch.replication.util.ValidationUtil.validateName +import org.opensearch.replication.util.ValidationUtil.validatePattern import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.master.AcknowledgedRequest import org.opensearch.core.ParseField @@ -113,8 +114,11 @@ class UpdateAutoFollowPatternRequest: AcknowledgedRequest