Skip to content

Commit

Permalink
fix: undefined type property
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Jan 6, 2024
1 parent 595d8b6 commit 2023bb6
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 2023bb6

Please sign in to comment.