getBuiltinType(), false, $types[0]->getClassName(), $types[0]->isCollection(), $types[0]->getCollectionKeyType(), // BC layer for symfony < 5.3 method_exists($types[0], 'getCollectionValueTypes') ? ($types[0]->getCollectionValueTypes()[0] ?? null) : $types[0]->getCollectionValueType() ); // ignore nullable field if ($types[0]->isNullable()) { $property->nullable = true; $property->allOf = [new OA\Schema(['ref' => $this->modelRegistry->register(new Model($type, $groups))])]; return; } $property->ref = $this->modelRegistry->register(new Model($type, $groups)); } public function supports(array $types): bool { return 1 === count($types) && Type::BUILTIN_TYPE_OBJECT === $types[0]->getBuiltinType(); } }