You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Following this issue, there is a problem when using regexes on path.
Let's say I have 2 routes : GET /users/{userID:[^/]+} and POST /users/{userID:[^/]+}.
In helper.go, in Spec.SetupOperation(), we get the pathItem (l.40) from s.Paths.MapOfPathItemValues by using the path as key (so in this case, /users/{userID:[^/]+}). But at the end of the method, we set the new pathItem under the key /users/{userID} (the path without the regex). When we setup the operation for the next method, we get the pathItem under the key /users/{userID:[^/]+}, which is empty, so the first routes is overridden completely by the second one.
I think getting the pathItem after the regex substitution should solve the issue (so after l. 51, maybe at l.54 because the first use of pathItem is at line 55).
The text was updated successfully, but these errors were encountered:
Hi,
Following this issue, there is a problem when using regexes on path.
Let's say I have 2 routes :
GET /users/{userID:[^/]+}
andPOST /users/{userID:[^/]+}
.In
helper.go
, inSpec.SetupOperation()
, we get the pathItem (l.40) froms.Paths.MapOfPathItemValues
by using the path as key (so in this case,/users/{userID:[^/]+}
). But at the end of the method, we set the new pathItem under the key/users/{userID}
(the path without the regex). When we setup the operation for the next method, we get the pathItem under the key/users/{userID:[^/]+}
, which is empty, so the first routes is overridden completely by the second one.I think getting the
pathItem
after the regex substitution should solve the issue (so after l. 51, maybe at l.54 because the first use ofpathItem
is at line 55).The text was updated successfully, but these errors were encountered: