Skip to content

Commit

Permalink
fix(metadata): providing parameter constraints skips automatic ones (#…
Browse files Browse the repository at this point in the history
…6756)

Co-authored-by: Eric GELOEN <[email protected]>
Co-authored-by: Antoine Bluchet <[email protected]>
  • Loading branch information
3 people authored Oct 26, 2024
1 parent 8c0e30f commit 4f65ef2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public function create(string $resourceClass): ResourceMetadataCollection

private function addSchemaValidation(Parameter $parameter, ?array $schema = null, ?bool $required = null, ?OpenApiParameter $openApi = null): Parameter
{
if (null !== $parameter->getConstraints()) {
return $parameter;
}

$schema ??= $parameter->getSchema();
$required ??= $parameter->getRequired() ?? false;
$openApi ??= $parameter->getOpenApi();
Expand Down

0 comments on commit 4f65ef2

Please sign in to comment.