Skip to content

Commit

Permalink
Merge 89d351b into 1927451
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbeil committed Nov 30, 2019
2 parents 1927451 + 89d351b commit 15404d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OpenApi/Guesser/OpenApiSchema/OpenApiGuesser.php
Expand Up @@ -103,13 +103,13 @@ protected function getClassFromOperation($name, ?Operation $operation, $referenc
}
}

if ($operation->getRequestBody() && $operation->getRequestBody()->getContent()) {
if (null !== $operation->getRequestBody() && is_iterable($operation->getRequestBody()->getContent())) {
foreach ($operation->getRequestBody()->getContent() as $contentType => $content) {
$this->chainGuesser->guessClass($content->getSchema(), $name . 'Body', $reference . '/requestBody/content/' . $contentType . '/schema', $registry);
}
}

if ($operation->getResponses()) {
if (is_iterable($operation->getResponses())) {
foreach ($operation->getResponses() as $status => $response) {
if ($response instanceof Response && $response->getContent()) {
foreach ($response->getContent() as $contentType => $content) {
Expand Down

0 comments on commit 15404d9

Please sign in to comment.