oneOf = Generator::UNDEFINED !== $property->oneOf ? $property->oneOf : []; foreach ($types as $type) { $property->oneOf[] = $schema = Util::createChild($property, OA\Schema::class, []); $this->propertyDescriber->describe([$type], $schema, $groups, $schema, $context); } } public function supports(array $types): bool { return count($types) >= 2; } }