diff --git a/src/Metadata/Parameter.php b/src/Metadata/Parameter.php index 88dc06fd5fc..be68bc03412 100644 --- a/src/Metadata/Parameter.php +++ b/src/Metadata/Parameter.php @@ -14,6 +14,7 @@ namespace ApiPlatform\Metadata; use ApiPlatform\OpenApi; +use ApiPlatform\State\ParameterNotFound; use ApiPlatform\State\ParameterProviderInterface; use Symfony\Component\Validator\Constraint; @@ -107,7 +108,7 @@ public function getConstraints(): Constraint|array|null */ public function getValue(): mixed { - return $this->extraProperties['_api_values'] ?? null; + return $this->extraProperties['_api_values'] ?? new ParameterNotFound(); } /**