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
The last setUrl() call doesn't empty the parameters, and instead keeps them as before.
Expected behavior
The last $parameters should be empty, since the URL has no parameters.
Context
We're currently generating an OpenAPI specification based on all of our registered routes. Since OpenAPI doesn't allow route parameters to be optional, we have to split the routes in two (/route/{optional?} to /route and /route/optional), which is easily possible with a simple clone $route followed by setUrl(). But due to the parameters not being cleared we get problems further down the line.
The text was updated successfully, but these errors were encountered:
Current behavior
Lets take the following example snippet:
The last
setUrl()
call doesn't empty the parameters, and instead keeps them as before.Expected behavior
The last
$parameters
should be empty, since the URL has no parameters.Context
We're currently generating an OpenAPI specification based on all of our registered routes. Since OpenAPI doesn't allow route parameters to be optional, we have to split the routes in two (
/route/{optional?}
to/route
and/route/optional
), which is easily possible with a simpleclone $route
followed bysetUrl()
. But due to the parameters not being cleared we get problems further down the line.The text was updated successfully, but these errors were encountered: