fix/variables highlighting (#2502)

* js highlighting fix, only highlight path params pattern in url bar

* path param pattern matching validation update

* path param tooltip validation update
This commit is contained in:
lohit
2024-07-01 19:25:55 +05:30
committed by GitHub
parent 02e23df349
commit bd61e453ee
4 changed files with 19 additions and 14 deletions

View File

@@ -31,8 +31,8 @@ if (!SERVER_RENDERED) {
if (str.startsWith('{{')) {
variableName = str.replace('{{', '').replace('}}', '').trim();
variableValue = interpolate(get(options.variables, variableName), options.variables);
} else if (str.startsWith(':')) {
variableName = str.replace(':', '').trim();
} else if (str.startsWith('/:')) {
variableName = str.replace('/:', '').trim();
variableValue =
options.variables && options.variables.pathParams ? options.variables.pathParams[variableName] : undefined;
}