diff --git a/ModelDescriber/ObjectModelDescriber.php b/ModelDescriber/ObjectModelDescriber.php index 5f20cd74b..21f8d030d 100644 --- a/ModelDescriber/ObjectModelDescriber.php +++ b/ModelDescriber/ObjectModelDescriber.php @@ -188,6 +188,9 @@ private function describeProperty(array $types, Model $model, OA\Schema $propert */ private function getAnnotation(\ReflectionClass $reflection, string $className) { + if (false === class_exists($className)) { + return null; + } if (\PHP_VERSION_ID >= 80000) { if (null !== $attribute = $reflection->getAttributes($className, \ReflectionAttribute::IS_INSTANCEOF)[0] ?? null) { return $attribute->newInstance();