Skip to content

Commit 38fad74

Browse files
committed
Make sure items property is a schema
1 parent 329fb58 commit 38fad74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Generator/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static function generate(string $name, string $namespace, string $classNa
7676
)
7777
);
7878
if (is_string($property->type)) {
79-
if ($property->type === 'array' && array_key_exists(spl_object_hash($property->items), $schemaClassNameMap)) {
79+
if ($property->type === 'array' && $property->items instanceof OpenAPiSchema && array_key_exists(spl_object_hash($property->items), $schemaClassNameMap)) {
8080
$docBlock[] = '@var array<' . $namespace . '\\' . $schemaClassNameMap[spl_object_hash($property->items)] . '>';
8181
}
8282
$propertyStmt->setType(str_replace([

0 commit comments

Comments
 (0)