Open
Description
Hello everyone,
i'm using the jms/serializer-bundle, fos/rest-bundle and the nelmio/api-doc-bundle.
I have a ManyToOne property with a abstract target entity:
/**
* @var User
*
* @ORM\ManyToOne(targetEntity="UserBundle\Entity\User")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $author;
The User Entity has a discrimatorMap which connects different User Types.
use JMS\Serializer\Annotation as Serializer;
/**
* @ORM\Entity(repositoryClass="UserBundle\Entity\UserRepository")
* @ORM\Table(name="app_user")
* @ORM\InheritanceType( "SINGLE_TABLE" )
* @ORM\DiscriminatorColumn( name = "discr", type = "string" )
* @ORM\DiscriminatorMap({
* "person" = "Person",
* "student" = "Student",
* "partner" = "Partner"
* })
* @Serializer\ExclusionPolicy("none")
*/
abstract class User { ... }
The serializer works, but in the api doc the author property is missing. Everything is marked correctly for the doc. There are other ManyToOne properties too (but not with abstract class) and they are showed correctly in the doc.
Any ideas what am I doing wrong?