Symfony 4.3 Route Collision in API

* @Route("/vehicle/{id}", methods={"GET"})

* @Route("/vehicle/categories/", methods={"GET"})

When I try to reach my API vehicleCategories without passing any parameters, symfony takes the first vehicle API and interprets “categories” as a parameter. How can I avoid this behaviour?
Both APIs are in the same controller.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *