mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-03 08:09:25 +03:00
78664ef9ec
* Initial pass for OA3 upgrade * Fix Util Tests * Fix first batch of Unit Tests. Up to Model * Another batch of fixed tests * Update annotations * Convert Model & Property Describers * Update tests, Fix RouteDescribers, FIx additional bugs * Another batch of updates * Another batch of fixed Functional Tests * Fix FunctionalTest tests * Fix Bazinga Tests * FIx FOS Rest * Fix JMS TEsts & describers * Fix all Tests * Fix few stuff from own CR * CS Fixes * CS Fixes 2 * CS Fixes 3 * CS Fixes 4 * Remove collection bug * Updates after first CRs * CS * Drop support for SF3 * Update the docs * Add an upgrade guide * misc doc fixes * Configurable media types * Code Style Fixes * Don't use ::$ref for @Response and @RequestBody * Fix upgrading guide * Fix OA case Co-authored-by: Filip Benčo <filip.benco@websupport.sk> Co-authored-by: Guilhem Niot <guilhem.niot@gmail.com> Co-authored-by: Mantis Development <mantis@users.noreply.github.com>
202 lines
4.3 KiB
PHP
202 lines
4.3 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 JMS\Serializer\Annotation as Serializer;
|
|
use OpenApi\Annotations as OA;
|
|
|
|
/**
|
|
* User.
|
|
*
|
|
* @Serializer\ExclusionPolicy("all")
|
|
*/
|
|
class JMSUser
|
|
{
|
|
/**
|
|
* @Serializer\Type("integer")
|
|
* @Serializer\Expose
|
|
* @Serializer\Groups({"list"})
|
|
*
|
|
* @OA\Property(description = "User id", readOnly = true, title = "userid", example=1, default = null)
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @Serializer\Type("int")
|
|
* @Serializer\Expose
|
|
* @Serializer\SerializedName("daysOnline")
|
|
*
|
|
* @OA\Property(default = 0, minimum = 1, maximum = 300)
|
|
*/
|
|
private $daysOnline;
|
|
|
|
/**
|
|
* @Serializer\Type("string")
|
|
* @Serializer\Expose
|
|
* @OA\Property(readOnly = false)
|
|
* @Serializer\Groups({"details"})
|
|
*/
|
|
private $email;
|
|
|
|
/**
|
|
* @Serializer\Type("array<string>")
|
|
* @Serializer\Accessor(getter="getRoles", setter="setRoles")
|
|
* @Serializer\Expose
|
|
*
|
|
* @OA\Property(default = {"user"}, description = "Roles list", example="[""ADMIN"",""SUPERUSER""]", title="roles")
|
|
*/
|
|
private $roles;
|
|
|
|
/**
|
|
* @Serializer\Type("string")
|
|
*/
|
|
private $password;
|
|
|
|
/**
|
|
* @OA\Property(property="last_update", type="date")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $updatedAt;
|
|
|
|
/**
|
|
* 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;
|
|
|
|
/**
|
|
* @Serializer\Type("array<string, Nelmio\ApiDocBundle\Tests\Functional\Entity\User>")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $indexedFriends;
|
|
|
|
/**
|
|
* @Serializer\Type("array<string, DateTime>")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $favoriteDates;
|
|
|
|
/**
|
|
* @Serializer\Type(Nelmio\ApiDocBundle\Tests\Functional\Entity\CustomDateTime::class)
|
|
* @Serializer\Expose
|
|
*/
|
|
private $customDate;
|
|
|
|
/**
|
|
* @Serializer\Type("integer")
|
|
* @Serializer\Expose
|
|
* @Serializer\SerializedName("friendsNumber")
|
|
*
|
|
* @OA\Property(type = "string", minLength = 1, maxLength = 100)
|
|
*/
|
|
private $friendsNumber;
|
|
|
|
/**
|
|
* @Serializer\Type(User::class)
|
|
* @Serializer\Expose
|
|
*/
|
|
private $bestFriend;
|
|
|
|
/**
|
|
* Whether this user is enabled or disabled.
|
|
*
|
|
* Only enabled users may be used in actions.
|
|
*
|
|
* @var string
|
|
* @Serializer\Type("string")
|
|
* @Serializer\Expose
|
|
*
|
|
* @OA\Property(enum = {"disabled", "enabled"})
|
|
*/
|
|
private $status;
|
|
|
|
/**
|
|
* JMS custom types handled via Custom Type Handlers.
|
|
*
|
|
* @var string
|
|
* @Serializer\Type("VirtualTypeClassDoesNotExistsHandlerDefined")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $virtualType1;
|
|
|
|
/**
|
|
* JMS custom types handled via Custom Type Handlers.
|
|
*
|
|
* @var string
|
|
* @Serializer\Type("VirtualTypeClassDoesNotExistsHandlerNotDefined")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $virtualType2;
|
|
|
|
/**
|
|
* @Serializer\Type("array<array<float>>")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $latLonHistory;
|
|
|
|
/**
|
|
* @Serializer\Type("array<string, array>")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $freeFormObject;
|
|
|
|
/**
|
|
* @Serializer\Type("array")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $freeFormObjectWithoutType;
|
|
|
|
/**
|
|
* @Serializer\Type("array<string, array<string, DateTime>>")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $deepObject;
|
|
|
|
/**
|
|
* @Serializer\Type("array<string, array<DateTime>>")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $deepObjectWithItems;
|
|
|
|
/**
|
|
* @Serializer\Type("array<array<array<string, array>>>")
|
|
* @Serializer\Expose
|
|
*/
|
|
private $deepFreeFormObjectCollection;
|
|
|
|
/**
|
|
* @Serializer\Type("Nelmio\ApiDocBundle\Tests\Functional\Entity\JMSNote")
|
|
* @Serializer\Inline()
|
|
* @Serializer\Expose
|
|
*/
|
|
private $notes;
|
|
|
|
public function setRoles($roles)
|
|
{
|
|
}
|
|
|
|
public function getRoles()
|
|
{
|
|
}
|
|
|
|
public function setDummy(Dummy $dummy)
|
|
{
|
|
}
|
|
}
|