Skip to content

Commit

Permalink
Fix Schema inheritance issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
likemusic committed Sep 21, 2022
1 parent 4f63dcb commit 53f280c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,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 53f280c

Please sign in to comment.