getBuiltinType(), false, $types[0]->getClassName(), $types[0]->isCollection(), // BC layer for symfony < 5.3 method_exists($types[0], 'getCollectionKeyTypes') ? $types[0]->getCollectionKeyTypes() : $types[0]->getCollectionKeyType(), 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 = [Util::createChild($property, OA\Schema::class, ['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(); } }