AutoRoute icon indicating copy to clipboard operation
AutoRoute copied to clipboard

IDs in paths dont seem to route correctly

Open joeySchentrup opened this issue 1 year ago • 3 comments

I may be doing something wrong here, but based on the documentation, a route like /group/78/something should be able to route to BaseNameSpace\Group\Something\GetGroupSomething. When trying it out though, it seems to be looking for a folder/namespace at Group/78. There is the messages from the router.

Image

Am I wrong in this? I'm believed this is supposed to be possible from this part of the README:

Image

We have ignoreParams set to 2 and wordSeparator set to "" (empty string) if that makes any difference.

joeySchentrup avatar Apr 04 '25 21:04 joeySchentrup

To add come more context: It looks like that the issue is that there is no GET /group action that has a path parameter. Adding that action looks like it will solve the problem (even if the action is empty).

joeySchentrup avatar Apr 07 '25 12:04 joeySchentrup

Can you point me to (or paste here) the action class signature the route is supposed to lead to?

pmjones avatar Apr 07 '25 14:04 pmjones

Here is what it looks like:

Image

If I have just this file at Actions/Group/Something/GetGroupSomething.php, GET /group/78/something does not work. If I add an action like this:

Image

at Actions/Group/GetGroup.php, then GET /group/78/something does work.

joeySchentrup avatar Apr 07 '25 15:04 joeySchentrup