Custom route via @Api\Route("") allows any char at beginning

Issue #25 resolved
Former user created an issue

Hello,

given there are two methods in your api class:

First:

/**
 * @Api\Route("/city/list")
 */
public function anyNameAction() {}

Second:

/**
 * @Api\Route("/test-city/list")
 */
public function anyOtherAction() {}

I can now call the first method by accessing /api/city/list, but I cannot access the second method via /api/test-city/list. It will always call the first method.

Furthermore any combination of letters withihn /api/*city/list will call the first method i.e. /api/greencity/list, /api/green-city/list /api/dfsdkfhkcity/list will all call the first method.

Currently I'm not sure if this a bug or a feature.

Cheers Jens

Comments (4)

  1. David Bascom

    Thanks for reporting!
    This was not intended – had to do with a preg_match that was held too open.

  2. Log in to comment