title: How to hide an entity property in Symfony4 api-platform
body: <p>I have this entity</p>
  
  <pre><code>/**
  * @ApiResource(
  *       collectionOperations={
  *           "get"={
  *               "access_control"="is_granted('IS_AUTHENTICATED_FULLY')"
  *           },
  *           "post"={
  *               "access_control"="is_granted('IS_AUTHENTICATED_FULLY')"
  *           }
  *       },
  *       itemOperations={
  *       "get"={
  *               "access_control"="is_granted('ROLE_ADMIN') or object.getUser() == user"
  *           },
  *           "put"={
  *               "access_control"="is_granted('ROLE_ADMIN') or object.getUser() == user"
  *          },
  *           "delete"={
  *               "access_control"="is_granted('ROLE_ADMIN') or object.getUser() == user"
  *          }
  *       }
  * )
  * @ORM\Entity(repositoryClass="App\Repository\FeedRepository")
  */
  class Feed implements AuthoredEntityInterface
  {
  /**
   * @ORM\Id()
   * @ORM\GeneratedValue()
   * @ORM\Column(type="integer")
   */
  private $id;
  
  /**
   * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="feeds")
   * @ORM\JoinColumn(nullable=false)
   */
  private $user;
  
  /**
   * @ORM\Column(type="string", length=255)
   */
  private $name;
  
  /**
   * @ORM\Column(type="string", length=2083, unique=true)
   */
  private $url;
  
  //various getters and setters
  
  }
  </code></pre>
  
  <p>The related User entity implements UserInterface. This entity implements an interface I use to auto populate the user field with the logged user. </p>
  
  <p>The auto generated /api/feeds POST endpoint expects 3 parameters: user, name and url.</p>
  
  <p>I want to exclude the parameter user from the endpoint (because auto-generated internally). I know I could just not to use it but this is causing problems in testing where I get this message:</p>
  
  <p><strong>Invalid value provided (invalid IRI?)</strong></p>
  
  <p>thanks</p>