Guilhem N 73a5f104d6
Use @SWG\Parameter type when set instead of throwing (#1174)
* Add an exception

* Just use the manually defined type when set

* Update the jms model describer
2018-01-11 12:26:59 +01:00

129 lines
2.2 KiB
PHP

<?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 Swagger\Annotations as SWG;
/**
* @author Guilhem N. <egetick@gmail.com>
*/
class User
{
/**
* @var int
*
* @SWG\Property(description = "User id", required = true, readOnly = true, title = "userid", example=1, default = null)
*/
private $id;
/**
* @SWG\Property(type="string", readOnly = false)
*/
private $email;
/**
* @var string[]
*
* @SWG\Property(
* description = "User roles",
* required = true,
* title = "roles",
* example="[""ADMIN"",""SUPERUSER""]",
* default = {"user"},
* )
*/
private $roles;
/**
* @var int
*
* @SWG\Property(type = "string")
*/
private $friendsNumber;
/**
* @var float
* @SWG\Property(default = 0.0)
*/
private $money;
/**
* @var \DateTime
*/
private $createdAt;
/**
* @var User[]
*/
private $users;
/**
* @var string
*
* @SWG\Property(enum = {"disabled", "enabled"})
*/
private $status;
/**
* @param float $money
*/
public function setMoney(float $money)
{
$this->money = $money;
}
/**
* @param int $id
*/
public function setId(int $id)
{
$this->id = $id;
}
public function setEmail($email)
{
$this->email = $email;
}
/**
* @param string[] $roles
*/
public function setRoles(array $roles)
{
$this->roles = $roles;
}
/**
* @param int $friendsNumber
*/
public function setFriendsNumber(int $friendsNumber)
{
$this->friendsNumber = $friendsNumber;
}
public function setCreatedAt(\DateTime $createAt)
{
}
public function setUsers(array $users)
{
}
public function setDummy(Dummy $dummy)
{
}
public function setStatus(string $status)
{
}
}