Skip to content

Commit 71dbfb1

Browse files
authored
fix: property called default in ApiProperty has incorrect type (#6471) (#6472)
The param annotation for default is set as `string|null` but should be no type, or mixed (like the example property)
1 parent e3013d4 commit 71dbfb1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Metadata/ApiProperty.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ final class ApiProperty
2828
* @param bool|null $writableLink https://api-platform.com/docs/core/serialization/#force-iri-with-relations-of-the-same-type-parentchilds-relations
2929
* @param bool|null $required https://api-platform.com/docs/admin/validation/#client-side-validation
3030
* @param bool|null $identifier https://api-platform.com/docs/core/identifiers/
31-
* @param string|null $default
3231
* @param mixed $example https://api-platform.com/docs/core/openapi/#using-the-openapi-and-swagger-contexts
3332
* @param string|null $deprecationReason https://api-platform.com/docs/core/deprecations/#deprecating-resource-classes-operations-and-properties
3433
* @param bool|null $fetchEager https://api-platform.com/docs/core/performance/#eager-loading
@@ -50,7 +49,7 @@ public function __construct(
5049
private ?bool $writableLink = null,
5150
private ?bool $required = null,
5251
private ?bool $identifier = null,
53-
private $default = null,
52+
private mixed $default = null,
5453
private mixed $example = null,
5554
/**
5655
* The `deprecationReason` option deprecates the current operation with a deprecation message.

0 commit comments

Comments
 (0)