diff --git a/ModelDescriber/Annotations/AnnotationsReader.php b/ModelDescriber/Annotations/AnnotationsReader.php index 1aa018d..0b31b1c 100644 --- a/ModelDescriber/Annotations/AnnotationsReader.php +++ b/ModelDescriber/Annotations/AnnotationsReader.php @@ -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); } } diff --git a/Tests/Functional/Entity/JMSUser.php b/Tests/Functional/Entity/JMSUser.php index 442a9ee..2de4469 100644 --- a/Tests/Functional/Entity/JMSUser.php +++ b/Tests/Functional/Entity/JMSUser.php @@ -48,6 +48,8 @@ class JMSUser private $email; /** + * User Roles Comment. + * * @Serializer\Type("array") * @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") */ diff --git a/Tests/Functional/Entity/User.php b/Tests/Functional/Entity/User.php index e0d5bb7..ebd7639 100644 --- a/Tests/Functional/Entity/User.php +++ b/Tests/Functional/Entity/User.php @@ -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 */ diff --git a/Tests/Functional/FunctionalTest.php b/Tests/Functional/FunctionalTest.php index 6e9ea49..8e3c9ae 100644 --- a/Tests/Functional/FunctionalTest.php +++ b/Tests/Functional/FunctionalTest.php @@ -172,6 +172,10 @@ class FunctionalTest extends WebTestCase 'items' => ['type' => 'string'], 'default' => ['user'], ], + 'location' => [ + 'title' => 'User Location.', + 'type' => 'string', + ], 'friendsNumber' => [ 'type' => 'string', ], diff --git a/Tests/Functional/JMSFunctionalTest.php b/Tests/Functional/JMSFunctionalTest.php index b71059d..3ad5704 100644 --- a/Tests/Functional/JMSFunctionalTest.php +++ b/Tests/Functional/JMSFunctionalTest.php @@ -103,6 +103,10 @@ class JMSFunctionalTest extends WebTestCase 'default' => ['user'], 'description' => 'Roles list', ], + 'location' => [ + 'type' => 'string', + 'title' => 'User Location.', + ], 'friendsNumber' => [ 'type' => 'string', 'maxLength' => 100,