Skip to content

Commit

Permalink
fix(http): update the regex for pathParams
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepdsvs committed Dec 16, 2024
1 parent 67de4a3 commit 916fa8a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/configurations/destinations/http/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}$"
}
}
}
Expand All @@ -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}$"
}
}
}
Expand All @@ -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}$"
}
}
}
Expand All @@ -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}$"
}
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/configurations/destinations/http/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -490,7 +490,7 @@
]
},
{
"name": "URL Parameters",
"name": "Request URL",
"fields": [
{
"type": "mapping",
Expand All @@ -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"
}
],
Expand All @@ -519,15 +519,15 @@
"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"
},
{
"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"
}
Expand All @@ -549,15 +549,15 @@
"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"
},
{
"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"
}
Expand Down

0 comments on commit 916fa8a

Please sign in to comment.