api-platform / api-platform/core
Mercure normalization context per topic
- 主要語言
- PHP
- 星號
- 2.6k
- 分支
- 980
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 49
描述
**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']],
]
]
)]
```
貢獻指南
評估
這個 Issue 還沒有評估資料。