-
-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inproper paths matching order #798
Comments
From this func's docs: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#paths-object
If you'd like to share another algorithm, feel free to open a PR along with a test showing this behavior. Note: looks like it's only a matter of fiddling with the |
In
openapi3/paths.go
,InMatchingOrder
consider number of variables only, assuming with the following two apis:/v1/api/{name:.*}
/v1/api/whatever/{id}
they have the same number of variables, and the first one is lexicographical less than the second, which cause the first one matched first, while we prefer the second api matched first,
The text was updated successfully, but these errors were encountered: