Skip to content

Commit 49ebc71

Browse files
committed
creating_new_rest_resource.md: Update Controller inheritance usefulness
1 parent 30e2d3c commit 49ebc71

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/api/rest_api/extending_rest_api/creating_new_rest_resource.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ The `ibexa.api_platform.resource` tag declares the service as an API Platform re
6161
A REST controller should:
6262

6363
- return an object (passed automatically to a normalizer) or a `Response` (to customize it further)
64-
- extend `Ibexa\Rest\Server\Controller` to inherit useful methods and properties like `InputDispatcher` or `RequestParser`
64+
- extend `Ibexa\Rest\Server\Controller`
65+
- to inherit useful methods and properties like `repository` or `router`
66+
- to be part of the [OpenAPI Description](#describe-resource-in-openapi-schema)
6567

6668
``` php
6769
[[= include_file('code_samples/api/rest_api/src/Rest/Controller/DefaultController.php', 0, 14) =]]
@@ -170,7 +172,7 @@ In `dev` mode, the resource appears in the live documentation at `<dev-domain>/a
170172
[[= include_file('code_samples/api/rest_api/src/Rest/Controller/DefaultController.php', 0, 215) =]]//…
171173
```
172174

173-
The resource can be tested from this live documentation.
175+
The resource can be tested from the live documentation.
174176

175177
For example, the `POST /greet` at `<dev-domain>/api/ibexa/v2/doc#/App/api_greet_post` can be tested this way:
176178

0 commit comments

Comments
 (0)