Skip to content

Commit 86421fb

Browse files
author
darkdarin
committed
fix: dont export properties field in schema if empty
1 parent 4b4559e commit 86421fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/DTO/Schema.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ final class Schema extends DataTransferObject implements SchemaReferenceInterfac
1515
protected array $onlyNotEmptyKeys = [
1616
'title',
1717
'description',
18-
'required'
18+
'required',
19+
'properties',
1920
];
2021

2122
public ?string $id;
@@ -51,7 +52,7 @@ final class Schema extends DataTransferObject implements SchemaReferenceInterfac
5152
/** @var array<string, mixed> */
5253
public array $definitions;
5354
/** @var array<string, self> */
54-
public array $properties;
55+
public array $properties = [];
5556
/** @var array<string, mixed> */
5657
public array $patternProperties;
5758
/** @var array<string, mixed> */

0 commit comments

Comments
 (0)