Skip to content

Commit

Permalink
fixed type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko committed Oct 15, 2024
1 parent a64c96b commit 0ae87c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Support/OperationExtensions/RequestBodyExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,11 @@ public function handle(Operation $operation, RouteInfo $routeInfo)

protected function isSchemaRequired(Reference|Schema $schema): bool
{
$type = $schema instanceof Reference
$schema = $schema instanceof Reference
? $schema->resolve()
: $schema->type;
: $schema;

$type = $schema instanceof Schema ? $schema->type : $schema;

if ($type instanceof ObjectType) {
return count($type->required) > 0;
Expand Down

0 comments on commit 0ae87c5

Please sign in to comment.