Skip to content

Commit

Permalink
Allow example arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
peter committed May 22, 2024
1 parent c5dc414 commit 23d7f22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SwaggerDefinitions/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Schema implements Arrayable
protected ?int $maximum = null;
protected ?int $minLength = null;
protected ?int $maxLength = null;
protected ?string $example = null;
protected string|array|null $example = null;

protected ?PropertiesCollection $properties = null;

Expand Down Expand Up @@ -124,12 +124,12 @@ public function setDescription(?string $description): void
$this->description = $description;
}

public function getExample(): ?string
public function getExample(): string|array|null
{
return $this->example;
}

public function setExample(?string $example): void
public function setExample(string|array|null $example): void
{
$this->example = $example;
}
Expand Down

0 comments on commit 23d7f22

Please sign in to comment.