Skip to content

Commit

Permalink
Fix Schema inheritance issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
likemusic authored and Valery Ivashchanka committed Sep 23, 2022
1 parent 4f63dcb commit 49bcaee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace OpenApi;

use OpenApi\Annotations as OA;
use OpenApi\Attributes as OAT;

/**
* Result of the analyser.
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 49bcaee

Please sign in to comment.