Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/dto.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ final class UserResetPasswordDto
}
```

**Note**: if you have any *denormalizationContext* groups on the *User* entity (or just on the entity *Post* operation), make sure to annotate the fields in the DTO class accordingly.

```php
<?php
// api/src/Model/User.php
Expand Down Expand Up @@ -88,6 +90,8 @@ This will dispatch the `App\Dto\Message` via [Symfony Messenger](https://symfony

To return another representation of your data in a [State Provider](./state-providers.md) we advise to specify the `output` attribute of the resource. Note that this technique works without any changes to the resource but your API documentation would be wrong.

**Note**: if you have any *normalizationContext* groups on the *User* entity (or just on the entity *Get* operation), make sure to annotate the fields in the DTO class accordingly.

```php
<?php

Expand Down