mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +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
|
||||
{
|
||||
$this->phpDocReader->updateProperty($reflectionProperty, $property);
|
||||
$this->openApiAnnotationsReader->updateProperty($reflectionProperty, $property, $serializationGroups);
|
||||
$this->phpDocReader->updateProperty($reflectionProperty, $property);
|
||||
$this->symfonyConstraintAnnotationReader->updateProperty($reflectionProperty, $property);
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,8 @@ class JMSUser
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* User Roles Comment.
|
||||
*
|
||||
* @Serializer\Type("array<string>")
|
||||
* @Serializer\Accessor(getter="getRoles", setter="setRoles")
|
||||
* @Serializer\Expose
|
||||
@ -56,6 +58,14 @@ class JMSUser
|
||||
*/
|
||||
private $roles;
|
||||
|
||||
/**
|
||||
* User Location.
|
||||
*
|
||||
* @Serializer\Type("string")
|
||||
* @Serializer\Expose
|
||||
*/
|
||||
private $location;
|
||||
|
||||
/**
|
||||
* @Serializer\Type("string")
|
||||
*/
|
||||
|
@ -31,6 +31,8 @@ class User
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* User Roles Comment.
|
||||
*
|
||||
* @var string[]
|
||||
*
|
||||
* @OA\Property(
|
||||
@ -42,6 +44,13 @@ class User
|
||||
*/
|
||||
private $roles;
|
||||
|
||||
/**
|
||||
* User Location.
|
||||
*
|
||||
* @OA\Property(type = "string")
|
||||
*/
|
||||
private $location;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
@ -112,6 +121,10 @@ class User
|
||||
$this->roles = $roles;
|
||||
}
|
||||
|
||||
public function setLocation(string $location)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $friendsNumber
|
||||
*/
|
||||
|
@ -172,6 +172,10 @@ class FunctionalTest extends WebTestCase
|
||||
'items' => ['type' => 'string'],
|
||||
'default' => ['user'],
|
||||
],
|
||||
'location' => [
|
||||
'title' => 'User Location.',
|
||||
'type' => 'string',
|
||||
],
|
||||
'friendsNumber' => [
|
||||
'type' => 'string',
|
||||
],
|
||||
|
@ -103,6 +103,10 @@ class JMSFunctionalTest extends WebTestCase
|
||||
'default' => ['user'],
|
||||
'description' => 'Roles list',
|
||||
],
|
||||
'location' => [
|
||||
'type' => 'string',
|
||||
'title' => 'User Location.',
|
||||
],
|
||||
'friendsNumber' => [
|
||||
'type' => 'string',
|
||||
'maxLength' => 100,
|
||||
|
Loading…
x
Reference in New Issue
Block a user