AddRoute documentation typo?
Xymanek opened this issue · 4 comments
Xymanek commented
* @Sonata\AddRoute(name="import", path="/import")
* @Sonata\AddRoute(name="send_mail", path="{id}/send_mail")
First begins with a slash, second doesn't. So what's the correct way?
kunicmarko20 commented
I think that it should always work without the slash, will test it to be sure, also what do you think about allowing just:
* @Sonata\AddRoute("import")
* @Sonata\AddRoute(name="send_mail", path="{id}/send_mail")
and using import
for name and path if path is not present?
Xymanek commented
It's ambiguous - is it global (/import
) or per object (/{id}/import
)?
Also would be nice to reduce the second line to just
* @Sonata\AddRoute("send_mail", path="{id}/send_mail")
kunicmarko20 commented
Well if it is per object you have to add {id}
, will fix the docs and remove the name=
.
kunicmarko20 commented