mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-03 08:09:25 +03:00
Fix User Warning: Multiple definitions for @OA\\Property()->title (#1630)
* Fix User Warning: Multiple definitions for @OA\\Property()->title * Add test * Pass CI..
This commit is contained in:
parent
4027fe8b6c
commit
5e6b894bdc
@ -50,8 +50,8 @@ class AnnotationsReader
|
|||||||
|
|
||||||
public function updateProperty(\ReflectionProperty $reflectionProperty, OA\Property $property, array $serializationGroups = null): void
|
public function updateProperty(\ReflectionProperty $reflectionProperty, OA\Property $property, array $serializationGroups = null): void
|
||||||
{
|
{
|
||||||
$this->phpDocReader->updateProperty($reflectionProperty, $property);
|
|
||||||
$this->openApiAnnotationsReader->updateProperty($reflectionProperty, $property, $serializationGroups);
|
$this->openApiAnnotationsReader->updateProperty($reflectionProperty, $property, $serializationGroups);
|
||||||
|
$this->phpDocReader->updateProperty($reflectionProperty, $property);
|
||||||
$this->symfonyConstraintAnnotationReader->updateProperty($reflectionProperty, $property);
|
$this->symfonyConstraintAnnotationReader->updateProperty($reflectionProperty, $property);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,8 @@ class JMSUser
|
|||||||
private $email;
|
private $email;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* User Roles Comment.
|
||||||
|
*
|
||||||
* @Serializer\Type("array<string>")
|
* @Serializer\Type("array<string>")
|
||||||
* @Serializer\Accessor(getter="getRoles", setter="setRoles")
|
* @Serializer\Accessor(getter="getRoles", setter="setRoles")
|
||||||
* @Serializer\Expose
|
* @Serializer\Expose
|
||||||
@ -56,6 +58,14 @@ class JMSUser
|
|||||||
*/
|
*/
|
||||||
private $roles;
|
private $roles;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User Location.
|
||||||
|
*
|
||||||
|
* @Serializer\Type("string")
|
||||||
|
* @Serializer\Expose
|
||||||
|
*/
|
||||||
|
private $location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Serializer\Type("string")
|
* @Serializer\Type("string")
|
||||||
*/
|
*/
|
||||||
|
@ -31,6 +31,8 @@ class User
|
|||||||
private $email;
|
private $email;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* User Roles Comment.
|
||||||
|
*
|
||||||
* @var string[]
|
* @var string[]
|
||||||
*
|
*
|
||||||
* @OA\Property(
|
* @OA\Property(
|
||||||
@ -42,6 +44,13 @@ class User
|
|||||||
*/
|
*/
|
||||||
private $roles;
|
private $roles;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User Location.
|
||||||
|
*
|
||||||
|
* @OA\Property(type = "string")
|
||||||
|
*/
|
||||||
|
private $location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*
|
*
|
||||||
@ -112,6 +121,10 @@ class User
|
|||||||
$this->roles = $roles;
|
$this->roles = $roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setLocation(string $location)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $friendsNumber
|
* @param int $friendsNumber
|
||||||
*/
|
*/
|
||||||
|
@ -172,6 +172,10 @@ class FunctionalTest extends WebTestCase
|
|||||||
'items' => ['type' => 'string'],
|
'items' => ['type' => 'string'],
|
||||||
'default' => ['user'],
|
'default' => ['user'],
|
||||||
],
|
],
|
||||||
|
'location' => [
|
||||||
|
'title' => 'User Location.',
|
||||||
|
'type' => 'string',
|
||||||
|
],
|
||||||
'friendsNumber' => [
|
'friendsNumber' => [
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
],
|
],
|
||||||
|
@ -103,6 +103,10 @@ class JMSFunctionalTest extends WebTestCase
|
|||||||
'default' => ['user'],
|
'default' => ['user'],
|
||||||
'description' => 'Roles list',
|
'description' => 'Roles list',
|
||||||
],
|
],
|
||||||
|
'location' => [
|
||||||
|
'type' => 'string',
|
||||||
|
'title' => 'User Location.',
|
||||||
|
],
|
||||||
'friendsNumber' => [
|
'friendsNumber' => [
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'maxLength' => 100,
|
'maxLength' => 100,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user