api-platform / api-platform/core

ApiProperty writableLink not taking into account when creating documentation

未關閉
#8,027 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Serializer
主要語言
PHP
星號
2.6k
分支
980
平均合併
2 天 2 小時
30 天內合併 PR
51

描述

**API Platform version(s) affected**: 2.6.5

**Description**

ApiProperty writableLink not taking into account in documentation for example value. For example i have
`ApiProperty(readableLink: true, writableLink: false, fetchEager: true)` on a property. But when the documentation is displayed the property is also expanded in post and patch requested body it should be only expanded in get operations.
**How to reproduce**

for example:

```php
/**
* User who made the entry or entry is assign to.
*/
#[
ORM\ManyToOne(targetEntity: User::class),
ApiProperty(readableLink: true, writableLink: false, fetchEager: true)
]
private ?User $user = null;
```

**Possible Solution**

**Additional Context**

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。