Skip to content

Commit b8b0411

Browse files
Apply suggestions from code review
Signed-off-by: Christian Wolf <[email protected]>
1 parent 5435dcd commit b8b0411

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

developer_manual/basics/controllers.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,10 @@ Both JSON (``application/json``) and XML (``text/xml``) are generated on-the-fly
480480
To select the output format, the ``?format=`` query parameter or the ``Accept`` header of the request work out of the box, no intervention is required.
481481
It is advised to prefer the header generally, as this is the more standardized way.
482482

483-
In order to make routing work for OCS routes you need to add :ref:`a separate 'ocs' entry<routes_ocs>` to the routing table in ``appinfo/routes.php`` of your app.
483+
To make routing work for OCS, the route must be registered in the core.
484+
This can be done in two ways:
485+
You can add an attribute `#[ApiRoute]` to the controller method.
486+
Alternatively, you can add :ref:`a separate 'ocs' entry<routes_ocs>` to the routing table in ``appinfo/routes.php`` of your app.
484487
Inside these, there are the same information as there are for normal routes.
485488

486489
.. code-block:: php

0 commit comments

Comments
 (0)