diff --git a/src/Analysis.php b/src/Analysis.php index 9ef11862..054d45f8 100644 --- a/src/Analysis.php +++ b/src/Analysis.php @@ -7,7 +7,6 @@ namespace OpenApi; use OpenApi\Annotations as OA; -use OpenApi\Attributes as OAT; /** * Result of the analyser. @@ -338,7 +337,7 @@ public function getSchemaForSource(string $fqdn): ?OA\Schema $definition = $definitions[$fqdn]; if (is_iterable($definition['context']->annotations)) { foreach (array_reverse($definition['context']->annotations) as $annotation) { - if (in_array(get_class($annotation), [OA\Schema::class, OAT\Schema::class]) && !$annotation->_aux) { + if (($annotation instanceof OA\Schema) && !$annotation->_aux) { return $annotation; } }