Skip to content

Commit 12c977f

Browse files
authored
Update operations.md
1 parent 3b3ffbf commit 12c977f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/operations.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ Note that the operation name, here `api_questions_answer_get_subresource`, is th
344344
It'll be automatically set to `$resources_$subresource(s)_get_subresource`. To find the correct operation name you
345345
may use `bin/console debug:router`.
346346

347-
Add to that, you can control depth of subresources with the parameter `maxDepth`. For example, if `Answer` entity also have subresource such as `comments`, you would like to not generate the route `api/questions/{id}/answers/{id}/comments`. You can do this by adding the parameter maxDepth in ApiSubresource annotation or yml/xml file configuration.
347+
### Control the depth of subresources
348+
349+
You can control depth of subresources with the parameter `maxDepth`. For example, if `Answer` entity also have subresource such as `comments`and you don't want the route `api/questions/{id}/answers/{id}/comments` to be generated. You can do this by adding the parameter maxDepth in ApiSubresource annotation or yml/xml file configuration.
348350

349351
```php
350352
<?php

0 commit comments

Comments
 (0)