Skip to content

Commit

Permalink
feat: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferror committed Feb 3, 2024
1 parent 91562d7 commit 9eda911
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Schema/V3/MessageRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ public function render(array $document): array
foreach ($document['properties'] as $property) {
$properties[$property['name']]['type'] = PropertyTypeTranslator::translate($property['type']);

if (isset($property['description'])) {
if (!empty($property['description'])) {
$properties[$property['name']]['description'] = $property['description'];
}

if (isset($property['format'])) {
if (!empty($property['format'])) {
$properties[$property['name']]['format'] = $property['format'];
}

if (isset($property['example'])) {
if (!empty($property['example'])) {
$properties[$property['name']]['example'] = $property['example'];
}

if (isset($property['required'])) {
if (isset($property['required']) && $property['required']) {
$required[] = $property['name'];
}
}
Expand Down

0 comments on commit 9eda911

Please sign in to comment.