propertyDescribers = $propertyDescribers; } public function describe(array $types, OA\Schema $property, array $groups = null) { $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)); } $property->type = 'array'; $this->setNullableProperty($types[0], $property); $property = Util::getChild($property, OA\Items::class); foreach ($this->propertyDescribers as $propertyDescriber) { if ($propertyDescriber instanceof ModelRegistryAwareInterface) { $propertyDescriber->setModelRegistry($this->modelRegistry); } if ($propertyDescriber->supports([$type])) { $propertyDescriber->describe([$type], $property, $groups); break; } } } public function supports(array $types): bool { return 1 === count($types) && $types[0]->isCollection(); } }