-
-
Notifications
You must be signed in to change notification settings - Fork 895
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
Wrong route match if routePrefix is defined #5203
Comments
Hi @soyuka. Could this issue be reopened? Not sure if you saw my comment directly in the PR #5208 (comment), but I think this is not yet resolved. |
usu
added a commit
to usu/api-platform-core
that referenced
this issue
Dec 4, 2022
usu
added a commit
to usu/api-platform-core
that referenced
this issue
Dec 4, 2022
soyuka
pushed a commit
that referenced
this issue
Dec 7, 2022
@soyuka sorry to bump, this can be closed as PR has been merged. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
API Platform version(s) affected: 3.0.4
Description
As of now,
routePrefix
is not included in operation name (which also serves as the symfony route name). This can lead to route name conflict and hence to wrong route matches, if multiple resources are defined on the the same resource class.How to reproduce
routePrefix
:Expected result: 403 Forbidden (matching GetCollection operation of the second ApiResource)
Received result: 200 (matching GetCollection operation of first ApiResource). Confusingly, the individual IRIs are still prefixed with /admin
Possible Solution
Include
routePrefix
in operation nameAdditional context
/users
leads to a "404 No route found exception"SwaggerUI:
Route Match Log:
The text was updated successfully, but these errors were encountered: