api-platform / api-platform/core

ApiProperty writableLink not taking into account when creating documentation

Open
#8,027 0 comments 0 reactions 0 assignees View on GitHub
Serializer
Dominant language
PHP
Stars
2.6k
Forks
980
Avg merge
2d 4h
Merged PRs (30d)
49

Description

**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**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.