2017-06-25 15:40:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of the NelmioApiDocBundle package.
|
|
|
|
*
|
|
|
|
* (c) Nelmio
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Nelmio\ApiDocBundle\Tests\Functional\Entity;
|
|
|
|
|
|
|
|
use JMS\Serializer\Annotation as Serializer;
|
2017-12-03 20:30:44 +02:00
|
|
|
use Swagger\Annotations as SWG;
|
2017-06-25 15:40:07 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* User.
|
|
|
|
*
|
|
|
|
* @Serializer\ExclusionPolicy("all")
|
|
|
|
*/
|
|
|
|
class JMSUser
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("integer")
|
|
|
|
* @Serializer\Expose
|
2017-12-03 20:30:44 +02:00
|
|
|
*
|
|
|
|
* @SWG\Property(description = "User id", required = true, readOnly = true, title = "userid", example=1)
|
2017-06-25 15:40:07 +02:00
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("string")
|
|
|
|
* @Serializer\Expose
|
2017-12-03 20:30:44 +02:00
|
|
|
*
|
|
|
|
* @SWG\Property(readOnly = false)
|
2017-06-25 15:40:07 +02:00
|
|
|
*/
|
|
|
|
private $email;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<string>")
|
|
|
|
* @Serializer\Accessor(getter="getRoles", setter="setRoles")
|
|
|
|
* @Serializer\Expose
|
2017-12-15 17:39:18 +01:00
|
|
|
* @SWG\Property(description = "User roles", required = true, title = "roles", example="[""ADMIN"",""SUPERUSER""]")
|
2017-06-25 15:40:07 +02:00
|
|
|
*/
|
|
|
|
private $roles;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("string")
|
|
|
|
*/
|
|
|
|
private $password;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Ignored as the JMS serializer can't detect its type.
|
|
|
|
*
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $createdAt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Serializer\Type("array<Nelmio\ApiDocBundle\Tests\Functional\Entity\User>")
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $friends;
|
|
|
|
|
2017-12-03 20:30:44 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type("integer")
|
|
|
|
* @Serializer\Expose
|
|
|
|
* @Serializer\SerializedName("friendsNumber")
|
|
|
|
*
|
|
|
|
* @SWG\Property(type = "string")
|
|
|
|
*/
|
|
|
|
private $friendsNumber;
|
|
|
|
|
2017-06-25 15:40:07 +02:00
|
|
|
/**
|
|
|
|
* @Serializer\Type(User::class)
|
|
|
|
* @Serializer\Expose
|
|
|
|
*/
|
|
|
|
private $bestFriend;
|
|
|
|
|
|
|
|
public function setRoles($roles)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getRoles()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setDummy(Dummy $dummy)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|