Skip to content

Commit d1038d7

Browse files
Benjamin Raudunglas
authored andcommitted
Describe the fact that first GET collectionOperation is used for resourceClass IRI (#407)
* Add note about the fact that first GET collectionOperation is used for resourceClass IRI * Update operations.md
1 parent ba8b346 commit d1038d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/operations.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,8 @@ automatically instantiated and injected, without having to declare it explicitly
485485
In the following example, the built-in `GET` operation is registered as well as a custom operation called `special`.
486486
The `special` operation reference the Symfony route named `book_special`.
487487

488+
Note: API Platform uses the first operation (with `GET` method) defined in `collectionOperations` to generate the IRI for this resource class. This means that as long as you dont want to overwrite the IRI for this resource class by intention, the default collection operation associated with the `GET` method should be the first operation defined inside collection operations.
489+
488490
```php
489491
<?php
490492
// src/Entity/Book.php

0 commit comments

Comments
 (0)