Skip to content

Commit

Permalink
fix: undefined type property (#1529)
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert authored Jan 7, 2024
1 parent 2e03e6d commit 598958d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Annotations/AbstractAnnotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,10 @@ public function jsonSerialize()
if (true === $data->nullable) {
if (isset($data->oneOf)) {
$data->oneOf[] = ['type' => 'null'];
} elseif (isset($data->anyOf)) {
$data->anyOf[] = ['type' => 'null'];
} elseif (isset($data->allOf)) {
$data->allOf[] = ['type' => 'null'];
} else {
$data->type = (array) $data->type;
$data->type[] = 'null';
Expand Down

0 comments on commit 598958d

Please sign in to comment.