Skip to content

Commit

Permalink
When the nullable attribute of the property is true, add the title at…
Browse files Browse the repository at this point in the history
…tribute
  • Loading branch information
LTaooo committed Sep 1, 2023
1 parent e1062da commit 730e562
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Annotations/AbstractAnnotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ public function jsonSerialize()
} else {
$ref['nullable'] = $data->nullable;
}
if (isset($data->title) && $data->title !== $defaultValues['title']) {
$ref['title'] = $data->title;
}
unset($data->nullable);
}
$data = (object) $ref;
Expand Down

0 comments on commit 730e562

Please sign in to comment.