forked from loafle/openapi-generator-original
Bugfix: Path replacement regex not working (#6580)
A previous change to make the regex a variable to allow proper linting resulted in the regexp not having access to the value associated with the variable and the path variable not being replaced. Moves the regexp variable inside the for loop to allow the value to be used and the path variable to be replaced with the provided value.
This commit is contained in:
parent
d04b7642f6
commit
87a9caa33f
@ -407,8 +407,8 @@ build_request_path() {
|
||||
fi
|
||||
|
||||
# First replace all path parameters in the path
|
||||
local path_regex="(.*)(\\{$pparam\\})(.*)"
|
||||
for pparam in "${path_params[@]}"; do
|
||||
local path_regex="(.*)(\\{$pparam\\})(.*)"
|
||||
if [[ $path_template =~ $path_regex ]]; then
|
||||
path_template=${BASH_REMATCH[1]}${operation_parameters[$pparam]}${BASH_REMATCH[3]}
|
||||
fi
|
||||
|
@ -509,8 +509,8 @@ build_request_path() {
|
||||
fi
|
||||
|
||||
# First replace all path parameters in the path
|
||||
local path_regex="(.*)(\\{$pparam\\})(.*)"
|
||||
for pparam in "${path_params[@]}"; do
|
||||
local path_regex="(.*)(\\{$pparam\\})(.*)"
|
||||
if [[ $path_template =~ $path_regex ]]; then
|
||||
path_template=${BASH_REMATCH[1]}${operation_parameters[$pparam]}${BASH_REMATCH[3]}
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user