From ebd76845033b1999091e9e4ea1c4ac731d436434 Mon Sep 17 00:00:00 2001 From: Oleksii Ivanov Date: Wed, 15 May 2024 17:52:34 +0300 Subject: [PATCH] chore: improve validation of (expression) multi-line text fields --- .../blue-prism/element-templates/blue-prism-connector.json | 4 ++-- .../easy-post/element-templates/easy-post-connector.json | 2 +- connectors/github/element-templates/github-connector.json | 6 +++--- connectors/gitlab/element-templates/gitlab-connector.json | 2 +- .../element-templates/google-maps-platform-connector.json | 2 +- .../element-templates/graphql-outbound-connector.json | 4 ++-- .../hybrid/graphql-outbound-connector-hybrid.json | 4 ++-- .../connector/http/graphql/model/GraphQLRequest.java | 2 +- .../connector/http/base/auth/OAuthAuthentication.java | 2 +- .../connector/http/base/model/HttpCommonRequest.java | 2 +- .../element-templates/http-polling-connector-boundary.json | 4 ++-- .../polling/element-templates/http-polling-connector.json | 4 ++-- .../http/rest/element-templates/http-json-connector.json | 4 ++-- .../hybrid/http-json-connector-hybrid.json | 4 ++-- .../element-templates/hugging-face-connector.json | 2 +- .../hybrid/jdbc-outbound-connector-hybrid.json | 2 +- .../jdbc/element-templates/jdbc-outbound-connector.json | 2 +- .../jdbc/model/request/connection/UriConnection.java | 2 +- connectors/openai/element-templates/openai-connector.json | 2 +- connectors/operate/element-templates/operate-connector.json | 2 +- .../hybrid/rabbitmq-inbound-connector-boundary-hybrid.json | 2 +- .../rabbitmq-inbound-connector-intermediate-hybrid.json | 2 +- .../rabbitmq-inbound-connector-message-start-hybrid.json | 2 +- .../rabbitmq-inbound-connector-start-event-hybrid.json | 2 +- .../hybrid/rabbitmq-outbound-connector-hybrid.json | 2 +- .../rabbitmq-inbound-connector-boundary.json | 2 +- .../rabbitmq-inbound-connector-intermediate.json | 2 +- .../rabbitmq-inbound-connector-message-start.json | 2 +- .../rabbitmq-inbound-connector-start-event.json | 2 +- .../element-templates/rabbitmq-outbound-connector.json | 2 +- .../connector/rabbitmq/common/model/UriAuthentication.java | 2 +- .../salesforce/element-templates/salesforce-connector.json | 4 ++-- .../hybrid/slack-outbound-connector-hybrid.json | 4 ++-- .../slack/element-templates/slack-outbound-connector.json | 4 ++-- .../slack/outbound/model/ConversationsCreateData.java | 2 +- .../slack/outbound/model/ConversationsInviteData.java | 2 +- connectors/twilio/element-templates/twilio-connector.json | 2 +- connectors/uipath/element-templates/uipath-connector.json | 2 +- 38 files changed, 50 insertions(+), 50 deletions(-) diff --git a/connectors/blue-prism/element-templates/blue-prism-connector.json b/connectors/blue-prism/element-templates/blue-prism-connector.json index ad5beb4d09..e3f3e24bcf 100644 --- a/connectors/blue-prism/element-templates/blue-prism-connector.json +++ b/connectors/blue-prism/element-templates/blue-prism-connector.json @@ -369,7 +369,7 @@ }, "constraints": { "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Priority must be integer value" }, "notEmpty": false @@ -431,7 +431,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/easy-post/element-templates/easy-post-connector.json b/connectors/easy-post/element-templates/easy-post-connector.json index ec2ab26057..da4a6d7b64 100644 --- a/connectors/easy-post/element-templates/easy-post-connector.json +++ b/connectors/easy-post/element-templates/easy-post-connector.json @@ -839,7 +839,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/github/element-templates/github-connector.json b/connectors/github/element-templates/github-connector.json index 28ca681e7d..3f2cb3ce65 100644 --- a/connectors/github/element-templates/github-connector.json +++ b/connectors/github/element-templates/github-connector.json @@ -1921,7 +1921,7 @@ "constraints": { "notEmpty": true, "pattern": { - "value": "^(=.+|refs\\/[^\\/]+\\/[^\\/]*)", + "value": "^(=|refs\\/[^\\/]+\\/[^\\/]*)", "message": "must be a fully qualified reference (i.e: refs/heads/main) starting with \"refs\" and containing at least two slashes." } }, @@ -1946,7 +1946,7 @@ "constraints": { "notEmpty": true, "pattern": { - "value": "^(=.+|.{40})", + "value": "^(=|.{40})", "message": "must consist of 40 characters." } }, @@ -2738,7 +2738,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "must be a timeout in seconds (default value is 20 seconds) or a FEEL expression." } } diff --git a/connectors/gitlab/element-templates/gitlab-connector.json b/connectors/gitlab/element-templates/gitlab-connector.json index e85615b0d4..2d54f6e523 100644 --- a/connectors/gitlab/element-templates/gitlab-connector.json +++ b/connectors/gitlab/element-templates/gitlab-connector.json @@ -65,7 +65,7 @@ "constraints": { "notEmpty": true, "pattern": { - "value": "^(=|https?://|\\{\\{secrets\\..+\\}\\}).*$", + "value": "^(=|(https?://|\\{\\{secrets\\..+\\}\\}).*$)", "message": "Must be a http(s) URL" } } diff --git a/connectors/google-maps-platform/element-templates/google-maps-platform-connector.json b/connectors/google-maps-platform/element-templates/google-maps-platform-connector.json index 0540ce619d..6d0872ec18 100644 --- a/connectors/google-maps-platform/element-templates/google-maps-platform-connector.json +++ b/connectors/google-maps-platform/element-templates/google-maps-platform-connector.json @@ -436,7 +436,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/http/graphql/element-templates/graphql-outbound-connector.json b/connectors/http/graphql/element-templates/graphql-outbound-connector.json index 4950cb7391..e27692c7ea 100644 --- a/connectors/http/graphql/element-templates/graphql-outbound-connector.json +++ b/connectors/http/graphql/element-templates/graphql-outbound-connector.json @@ -199,7 +199,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, @@ -343,7 +343,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, diff --git a/connectors/http/graphql/element-templates/hybrid/graphql-outbound-connector-hybrid.json b/connectors/http/graphql/element-templates/hybrid/graphql-outbound-connector-hybrid.json index cec97f4251..f7de005451 100644 --- a/connectors/http/graphql/element-templates/hybrid/graphql-outbound-connector-hybrid.json +++ b/connectors/http/graphql/element-templates/hybrid/graphql-outbound-connector-hybrid.json @@ -204,7 +204,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, @@ -348,7 +348,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, diff --git a/connectors/http/graphql/src/main/java/io/camunda/connector/http/graphql/model/GraphQLRequest.java b/connectors/http/graphql/src/main/java/io/camunda/connector/http/graphql/model/GraphQLRequest.java index 1cbd6a9180..e0cf65c67f 100644 --- a/connectors/http/graphql/src/main/java/io/camunda/connector/http/graphql/model/GraphQLRequest.java +++ b/connectors/http/graphql/src/main/java/io/camunda/connector/http/graphql/model/GraphQLRequest.java @@ -61,7 +61,7 @@ public record GraphQL( @FEEL @NotBlank @Pattern( - regexp = "^(=|http://|https://|secrets|\\{\\{).*$", + regexp = "^(=|(http://|https://|secrets|\\{\\{).*$)", message = "Must be a http(s) URL") @TemplateProperty(id = "url", group = "endpoint", label = "URL") String url, diff --git a/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/auth/OAuthAuthentication.java b/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/auth/OAuthAuthentication.java index 8bacbd3cdd..279e6f27a8 100644 --- a/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/auth/OAuthAuthentication.java +++ b/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/auth/OAuthAuthentication.java @@ -33,7 +33,7 @@ public record OAuthAuthentication( @FEEL @NotEmpty @Pattern( - regexp = "^(=|http://|https://|secrets|\\{\\{).*$", + regexp = "^(=|(http://|https://|secrets|\\{\\{).*$)", message = "Must be a http(s) URL") @TemplateProperty( group = "authentication", diff --git a/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/model/HttpCommonRequest.java b/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/model/HttpCommonRequest.java index 703b8d0a2d..e448724e31 100644 --- a/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/model/HttpCommonRequest.java +++ b/connectors/http/http-base/src/main/java/io/camunda/connector/http/base/model/HttpCommonRequest.java @@ -38,7 +38,7 @@ public class HttpCommonRequest { @FEEL @NotBlank - @Pattern(regexp = "^(=|http://|https://|secrets|\\{\\{).*$", message = "Must be a http(s) URL") + @Pattern(regexp = "^(=|(http://|https://|secrets|\\{\\{).*$)", message = "Must be a http(s) URL") @TemplateProperty(group = "endpoint", label = "URL") private String url; diff --git a/connectors/http/polling/element-templates/http-polling-connector-boundary.json b/connectors/http/polling/element-templates/http-polling-connector-boundary.json index f641f88c65..af340ef306 100644 --- a/connectors/http/polling/element-templates/http-polling-connector-boundary.json +++ b/connectors/http/polling/element-templates/http-polling-connector-boundary.json @@ -143,7 +143,7 @@ "constraints": { "notEmpty": true, "pattern": { - "value": "^(=|https?://|secrets\\..+|\\{\\{secrets\\..+\\}\\}).*$", + "value": "^(=|(https?://|secrets\\..+|\\{\\{secrets\\..+\\}\\}).*$)", "message": "must be a http(s) URL" } } @@ -440,7 +440,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|secrets\\..+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|secrets\\..+|\\{\\{secrets\\..+\\}\\})$)", "message": "must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/http/polling/element-templates/http-polling-connector.json b/connectors/http/polling/element-templates/http-polling-connector.json index 1c8fcf01aa..7a6ca98074 100644 --- a/connectors/http/polling/element-templates/http-polling-connector.json +++ b/connectors/http/polling/element-templates/http-polling-connector.json @@ -144,7 +144,7 @@ "constraints": { "notEmpty": true, "pattern": { - "value": "^(=|https?://|secrets\\..+|\\{\\{secrets\\..+\\}\\}).*$", + "value": "^(=|(https?://|secrets\\..+|\\{\\{secrets\\..+\\}\\}).*$)", "message": "must be a http(s) URL" } } @@ -441,7 +441,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|secrets\\..+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|secrets\\..+|\\{\\{secrets\\..+\\}\\})$)", "message": "must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/http/rest/element-templates/http-json-connector.json b/connectors/http/rest/element-templates/http-json-connector.json index ab24c469f0..bf5b305fea 100644 --- a/connectors/http/rest/element-templates/http-json-connector.json +++ b/connectors/http/rest/element-templates/http-json-connector.json @@ -199,7 +199,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, @@ -352,7 +352,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, diff --git a/connectors/http/rest/element-templates/hybrid/http-json-connector-hybrid.json b/connectors/http/rest/element-templates/hybrid/http-json-connector-hybrid.json index 75a0b94d3c..ae2caf9cec 100644 --- a/connectors/http/rest/element-templates/hybrid/http-json-connector-hybrid.json +++ b/connectors/http/rest/element-templates/hybrid/http-json-connector-hybrid.json @@ -204,7 +204,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, @@ -357,7 +357,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|http://|https://|secrets|\\{\\{).*$", + "value" : "^(=|(http://|https://|secrets|\\{\\{).*$)", "message" : "Must be a http(s) URL" } }, diff --git a/connectors/hugging-face/element-templates/hugging-face-connector.json b/connectors/hugging-face/element-templates/hugging-face-connector.json index 89a9abea84..21be4aafb4 100644 --- a/connectors/hugging-face/element-templates/hugging-face-connector.json +++ b/connectors/hugging-face/element-templates/hugging-face-connector.json @@ -147,7 +147,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "must be a timeout in seconds (default value is 30 seconds) or a FEEL expression" } } diff --git a/connectors/jdbc/element-templates/hybrid/jdbc-outbound-connector-hybrid.json b/connectors/jdbc/element-templates/hybrid/jdbc-outbound-connector-hybrid.json index 15fb8af119..57574999e1 100644 --- a/connectors/jdbc/element-templates/hybrid/jdbc-outbound-connector-hybrid.json +++ b/connectors/jdbc/element-templates/hybrid/jdbc-outbound-connector-hybrid.json @@ -92,7 +92,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|jdbc:|secrets|\\{\\{).*$", + "value" : "^(=|(jdbc:|secrets|\\{\\{).*$)", "message" : "Must start with 'jdbc:' or contain a secret reference" } }, diff --git a/connectors/jdbc/element-templates/jdbc-outbound-connector.json b/connectors/jdbc/element-templates/jdbc-outbound-connector.json index d8e6f8fc93..d22dfa9238 100644 --- a/connectors/jdbc/element-templates/jdbc-outbound-connector.json +++ b/connectors/jdbc/element-templates/jdbc-outbound-connector.json @@ -87,7 +87,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|jdbc:|secrets|\\{\\{).*$", + "value" : "^(=|(jdbc:|secrets|\\{\\{).*$)", "message" : "Must start with 'jdbc:' or contain a secret reference" } }, diff --git a/connectors/jdbc/src/main/java/io/camunda/connector/jdbc/model/request/connection/UriConnection.java b/connectors/jdbc/src/main/java/io/camunda/connector/jdbc/model/request/connection/UriConnection.java index 45c44c0b30..7bbebc1ba2 100644 --- a/connectors/jdbc/src/main/java/io/camunda/connector/jdbc/model/request/connection/UriConnection.java +++ b/connectors/jdbc/src/main/java/io/camunda/connector/jdbc/model/request/connection/UriConnection.java @@ -20,7 +20,7 @@ public record UriConnection( @NotBlank @Pattern( - regexp = "^(=|jdbc:|secrets|\\{\\{).*$", + regexp = "^(=|(jdbc:|secrets|\\{\\{).*$)", message = "Must start with 'jdbc:' or contain a secret reference") @TemplateProperty( group = "connection", diff --git a/connectors/openai/element-templates/openai-connector.json b/connectors/openai/element-templates/openai-connector.json index 9ebcf9c17a..1826076835 100644 --- a/connectors/openai/element-templates/openai-connector.json +++ b/connectors/openai/element-templates/openai-connector.json @@ -384,7 +384,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "must be a timeout in seconds (default value is 30 seconds) or a FEEL expression" } } diff --git a/connectors/operate/element-templates/operate-connector.json b/connectors/operate/element-templates/operate-connector.json index bb63495b59..48662f7cb5 100644 --- a/connectors/operate/element-templates/operate-connector.json +++ b/connectors/operate/element-templates/operate-connector.json @@ -491,7 +491,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-boundary-hybrid.json b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-boundary-hybrid.json index f9cd1278ba..e3b6225b76 100644 --- a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-boundary-hybrid.json +++ b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-boundary-hybrid.json @@ -75,7 +75,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-intermediate-hybrid.json b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-intermediate-hybrid.json index 93dea994f3..456259ab49 100644 --- a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-intermediate-hybrid.json +++ b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-intermediate-hybrid.json @@ -75,7 +75,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-message-start-hybrid.json b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-message-start-hybrid.json index 0537a1ecec..6b1e884fcf 100644 --- a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-message-start-hybrid.json +++ b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-message-start-hybrid.json @@ -75,7 +75,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-start-event-hybrid.json b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-start-event-hybrid.json index 55f2e9ffb4..7742b517bd 100644 --- a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-start-event-hybrid.json +++ b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-inbound-connector-start-event-hybrid.json @@ -70,7 +70,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-outbound-connector-hybrid.json b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-outbound-connector-hybrid.json index 5e7c37997a..f89db3dba4 100644 --- a/connectors/rabbitmq/element-templates/hybrid/rabbitmq-outbound-connector-hybrid.json +++ b/connectors/rabbitmq/element-templates/hybrid/rabbitmq-outbound-connector-hybrid.json @@ -69,7 +69,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-boundary.json b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-boundary.json index 2260b7b00f..8320e01dc6 100644 --- a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-boundary.json +++ b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-boundary.json @@ -70,7 +70,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-intermediate.json b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-intermediate.json index a7a3f4f9b0..3f4ab9abaa 100644 --- a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-intermediate.json +++ b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-intermediate.json @@ -70,7 +70,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-message-start.json b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-message-start.json index 11e6fdd34a..aaec5a9f7d 100644 --- a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-message-start.json +++ b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-message-start.json @@ -70,7 +70,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-start-event.json b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-start-event.json index 51215a98b4..0187269364 100644 --- a/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-start-event.json +++ b/connectors/rabbitmq/element-templates/rabbitmq-inbound-connector-start-event.json @@ -65,7 +65,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/element-templates/rabbitmq-outbound-connector.json b/connectors/rabbitmq/element-templates/rabbitmq-outbound-connector.json index 6447ea7343..8fbba71ae0 100644 --- a/connectors/rabbitmq/element-templates/rabbitmq-outbound-connector.json +++ b/connectors/rabbitmq/element-templates/rabbitmq-outbound-connector.json @@ -64,7 +64,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|amqps?://|secrets|\\{\\{).*$", + "value" : "^(=|(amqps?://|secrets|\\{\\{).*$)", "message" : "Must start with amqp(s):// or contain a secret reference" } }, diff --git a/connectors/rabbitmq/src/main/java/io/camunda/connector/rabbitmq/common/model/UriAuthentication.java b/connectors/rabbitmq/src/main/java/io/camunda/connector/rabbitmq/common/model/UriAuthentication.java index 775ac2cc89..caf83952e8 100644 --- a/connectors/rabbitmq/src/main/java/io/camunda/connector/rabbitmq/common/model/UriAuthentication.java +++ b/connectors/rabbitmq/src/main/java/io/camunda/connector/rabbitmq/common/model/UriAuthentication.java @@ -15,7 +15,7 @@ public record UriAuthentication( @NotBlank @Pattern( - regexp = "^(=|amqps?://|secrets|\\{\\{).*$", + regexp = "^(=|(amqps?://|secrets|\\{\\{).*$)", message = "Must start with amqp(s):// or contain a secret reference") @TemplateProperty( group = "authentication", diff --git a/connectors/salesforce/element-templates/salesforce-connector.json b/connectors/salesforce/element-templates/salesforce-connector.json index 315f6411b6..6587cd67bb 100644 --- a/connectors/salesforce/element-templates/salesforce-connector.json +++ b/connectors/salesforce/element-templates/salesforce-connector.json @@ -64,7 +64,7 @@ "constraints": { "notEmpty": true, "pattern": { - "value": "^(=|https?://|\\{\\{secrets\\..+\\}\\}).*$", + "value": "^(=|(https?://|\\{\\{secrets\\..+\\}\\}).*$)", "message": "Must be a http(s) URL." } } @@ -442,7 +442,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|secrets\\..+)$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/slack/element-templates/hybrid/slack-outbound-connector-hybrid.json b/connectors/slack/element-templates/hybrid/slack-outbound-connector-hybrid.json index 16461db258..97135dc9d5 100644 --- a/connectors/slack/element-templates/hybrid/slack-outbound-connector-hybrid.json +++ b/connectors/slack/element-templates/hybrid/slack-outbound-connector-hybrid.json @@ -191,7 +191,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|[-_a-z0-9]{1,80}$)", + "value" : "^(=|([-_a-z0-9]{1,80}$))", "message" : "May contain up to 80 lowercase letters, digits, underscores, and dashes" } }, @@ -240,7 +240,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|[-_a-z0-9]{1,80}$)", + "value" : "^(=|([-_a-z0-9]{1,80}$))", "message" : "May contain up to 80 lowercase letters, digits, underscores, and dashes" } }, diff --git a/connectors/slack/element-templates/slack-outbound-connector.json b/connectors/slack/element-templates/slack-outbound-connector.json index 94b39a8b48..0c2f9a111f 100644 --- a/connectors/slack/element-templates/slack-outbound-connector.json +++ b/connectors/slack/element-templates/slack-outbound-connector.json @@ -186,7 +186,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|[-_a-z0-9]{1,80}$)", + "value" : "^(=|([-_a-z0-9]{1,80}$))", "message" : "May contain up to 80 lowercase letters, digits, underscores, and dashes" } }, @@ -235,7 +235,7 @@ "constraints" : { "notEmpty" : true, "pattern" : { - "value" : "^(=|[-_a-z0-9]{1,80}$)", + "value" : "^(=|([-_a-z0-9]{1,80}$))", "message" : "May contain up to 80 lowercase letters, digits, underscores, and dashes" } }, diff --git a/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsCreateData.java b/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsCreateData.java index e282dba1ec..de4e80c181 100644 --- a/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsCreateData.java +++ b/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsCreateData.java @@ -35,7 +35,7 @@ public record ConversationsCreateData( notEmpty = true, pattern = @Pattern( - value = "^(=|[-_a-z0-9]{1,80}$)", + value = "^(=|([-_a-z0-9]{1,80}$))", message = "May contain up to 80 lowercase letters, digits, underscores, and dashes")), feel = FeelMode.optional) diff --git a/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsInviteData.java b/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsInviteData.java index 332fd7a386..9d55a17448 100644 --- a/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsInviteData.java +++ b/connectors/slack/src/main/java/io/camunda/connector/slack/outbound/model/ConversationsInviteData.java @@ -35,7 +35,7 @@ public record ConversationsInviteData( notEmpty = true, pattern = @Pattern( - value = "^(=|[-_a-z0-9]{1,80}$)", + value = "^(=|([-_a-z0-9]{1,80}$))", message = "May contain up to 80 lowercase letters, digits, underscores, and dashes")), feel = FeelMode.optional) diff --git a/connectors/twilio/element-templates/twilio-connector.json b/connectors/twilio/element-templates/twilio-connector.json index 0c1887cef1..f9b386f5dc 100644 --- a/connectors/twilio/element-templates/twilio-connector.json +++ b/connectors/twilio/element-templates/twilio-connector.json @@ -529,7 +529,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } } diff --git a/connectors/uipath/element-templates/uipath-connector.json b/connectors/uipath/element-templates/uipath-connector.json index 14dc65d92c..e50f5741f1 100644 --- a/connectors/uipath/element-templates/uipath-connector.json +++ b/connectors/uipath/element-templates/uipath-connector.json @@ -523,7 +523,7 @@ "constraints": { "notEmpty": false, "pattern": { - "value": "^(=.+|[0-9]+|\\{\\{secrets\\..+\\}\\})$", + "value": "^(=|([0-9]+|\\{\\{secrets\\..+\\}\\})$)", "message": "Must be a timeout in seconds (default value is 20 seconds) or a FEEL expression" } }