First of all sorry for my english.
I am trying with API Platform and Symfony to do a POST on my customer entity. (the get works fine)
At the time of doing the POST I find myself with this error :
"Unable to generate an IRI for "App\Entity\Customer"."
Here is my entity I think the problem comes from here but I can't find the reason.
<?php
namespace App\Entity;
use ....
/**
* @ORM\Entity(repositoryClass=CustomerRepository::class)
*/
#[ApiResource(
collectionOperations: [
'get' => ['method' => 'get'],
'post' => ['method' => 'post'],
],
itemOperations: [
'get' => ['method' => 'get'],
'put' => ['method' => 'put'],
'delete' => ['method' => 'delete'],
],
denormalizationContext: ['groups' => ['write_customer']],
normalizationContext: ['groups' => ['read_customer']],
)]
class Customer
{
......