From 8c0dcf560595410e6f66bd3a35076d01bf1b37bf Mon Sep 17 00:00:00 2001 From: Guilhem Niot Date: Sun, 1 Nov 2020 11:32:13 +0100 Subject: [PATCH] Improve error about property type --- PropertyDescriber/ArrayPropertyDescriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PropertyDescriber/ArrayPropertyDescriber.php b/PropertyDescriber/ArrayPropertyDescriber.php index 7e299f6..6b59e12 100644 --- a/PropertyDescriber/ArrayPropertyDescriber.php +++ b/PropertyDescriber/ArrayPropertyDescriber.php @@ -33,7 +33,7 @@ class ArrayPropertyDescriber implements PropertyDescriberInterface, ModelRegistr { $type = $types[0]->getCollectionValueType(); if (null === $type) { - throw new \LogicException(sprintf('Property "%s" is an array, but its items type isn\'t specified. You can specify that by using the type `string[]` for instance or `@OA\Property(type="array", @OA\Items(type="string"))`.', $property->title)); + throw new \LogicException(sprintf('Property "%s" is an array, but its items type isn\'t specified. You can specify that by using the type `string[]` for instance or `@OA\Property(type="array", @OA\Items(type="string"))`.', $property->property)); } $property->type = 'array';