api-platform / api-platform/core
Mercure normalization context per topic
- Lenguaje dominante
- PHP
- Estrellas
- 2.6k
- Forks
- 980
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 49
Descripción
**Description**
I think it could be useful support to provide normalization context (or also other options) for mercure per topic. For example if the resource has an additional serialization groups for admin user but the resource update should still be dispatched to admin and simple user currently the hidden information would be dispatched to the simple user or otherwise admin would not receive private information.
**Example**
Maybe something like:
```
#[ApiResource(
mercure: [
'topics' => [
['topic' => '/book/1', 'private' => true, 'normalization_context' => ['read', 'read_admin']],
['topic' => '/book/1', 'private' => false, 'normalization_context' => ['read']],
]
]
)]
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.