Skip to content

Commit

Permalink
fix: parameter not found when no value (#6458)
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka authored Jul 8, 2024
1 parent 93e4b3d commit 7926dc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Metadata/Parameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace ApiPlatform\Metadata;

use ApiPlatform\OpenApi;
use ApiPlatform\State\ParameterNotFound;
use ApiPlatform\State\ParameterProviderInterface;
use Symfony\Component\Validator\Constraint;

Expand Down Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 7926dc6

Please sign in to comment.