Skip to content

Commit

Permalink
Added schema parameter to describe method of UUID property describer
Browse files Browse the repository at this point in the history
  • Loading branch information
stollr committed Apr 2, 2024
1 parent c800973 commit 7f30251
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PropertyDescriber/UuidPropertyDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ class UuidPropertyDescriber implements PropertyDescriberInterface
{
use NullablePropertyTrait;

public function describe(array $types, OA\Schema $property, array $groups = null)
public function describe(array $types, OA\Schema $property, array $groups = null, ?OA\Schema $schema = null)
{
$property->type = 'string';
$property->format = 'uuid';
$property->pattern = '^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$';
$this->setNullableProperty($types[0], $property);
$this->setNullableProperty($types[0], $property, $schema);
}

public function supports(array $types): bool
Expand Down

0 comments on commit 7f30251

Please sign in to comment.