From 916fa8a73ab457126635549edd199d24e753a8a5 Mon Sep 17 00:00:00 2001 From: sandeepdigumarty Date: Mon, 16 Dec 2024 16:55:56 +0530 Subject: [PATCH] fix(http): update the regex for pathParams --- src/configurations/destinations/http/schema.json | 12 ++++++------ .../destinations/http/ui-config.json | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/configurations/destinations/http/schema.json b/src/configurations/destinations/http/schema.json index 7f047f732..c1b9a4f4b 100644 --- a/src/configurations/destinations/http/schema.json +++ b/src/configurations/destinations/http/schema.json @@ -38,7 +38,7 @@ }, "from": { "type": "string", - "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" } } } @@ -50,7 +50,7 @@ "properties": { "path": { "type": "string", - "pattern": "^\\$(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" } } } @@ -62,11 +62,11 @@ "properties": { "to": { "type": "string", - "pattern": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" }, "from": { "type": "string", - "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" } } } @@ -78,11 +78,11 @@ "properties": { "to": { "type": "string", - "pattern": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" }, "from": { "type": "string", - "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" + "pattern": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$" } } } diff --git a/src/configurations/destinations/http/ui-config.json b/src/configurations/destinations/http/ui-config.json index 6e57807a6..990defd5a 100644 --- a/src/configurations/destinations/http/ui-config.json +++ b/src/configurations/destinations/http/ui-config.json @@ -481,7 +481,7 @@ "type": "textInput", "key": "from", "label": "Value", - "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", "placeholder": "e.g: $.properties.key1" } @@ -490,7 +490,7 @@ ] }, { - "name": "URL Parameters", + "name": "Request URL", "fields": [ { "type": "mapping", @@ -501,7 +501,7 @@ "type": "textInput", "label": "Path", "placeholder": "$.userId or users", - "regex": "^\\$(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant" } ], @@ -519,7 +519,7 @@ "type": "textInput", "key": "to", "label": "Key", - "regex": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "JSON path is not supported. Please enter a constant", "placeholder": "e.g: customerId" }, @@ -527,7 +527,7 @@ "type": "textInput", "key": "from", "label": "Value", - "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", "placeholder": "e.g: $.userId or userId" } @@ -549,7 +549,7 @@ "type": "textInput", "key": "to", "label": "Key", - "regex": "^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "JSON path is not supported. Please enter a constant", "placeholder": "e.g. content-type" }, @@ -557,7 +557,7 @@ "type": "textInput", "key": "from", "label": "Value", - "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", + "regex": "^\\$(?:\\.|(\\.(\\w+|\\*)|\\[\\d+\\]|\\[('\\w+'|\"\\w+\")\\]|\\[\\*\\]|\\.\\w+\\(\\))*)$|^(?!\\$)[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$", "regexErrorMessage": "Please enter a valid JSON path or a constant", "placeholder": "e.g. application/json" }