Skip to content

Commit 4f717c1

Browse files
authored
fix(openapi): allow null on allowReserved and allowEmptyValue properties (#7315)
1 parent 347c27e commit 4f717c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OpenApi/Model/Parameter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class Parameter
1717
{
1818
use ExtensionTrait;
1919

20-
public function __construct(private string $name, private string $in, private string $description = '', private bool $required = false, private bool $deprecated = false, private bool $allowEmptyValue = false, private array $schema = [], private ?string $style = null, private bool $explode = false, private bool $allowReserved = false, private $example = null, private ?\ArrayObject $examples = null, private ?\ArrayObject $content = null)
20+
public function __construct(private string $name, private string $in, private string $description = '', private bool $required = false, private bool $deprecated = false, private ?bool $allowEmptyValue = false, private array $schema = [], private ?string $style = null, private bool $explode = false, private ?bool $allowReserved = false, private $example = null, private ?\ArrayObject $examples = null, private ?\ArrayObject $content = null)
2121
{
2222
if (null === $style) {
2323
if ('query' === $in || 'cookie' === $in) {
@@ -148,7 +148,7 @@ public function withDeprecated(bool $deprecated): self
148148
return $clone;
149149
}
150150

151-
public function withAllowEmptyValue(bool $allowEmptyValue): self
151+
public function withAllowEmptyValue(?bool $allowEmptyValue): self
152152
{
153153
$clone = clone $this;
154154
$clone->allowEmptyValue = $allowEmptyValue;
@@ -180,7 +180,7 @@ public function withExplode(bool $explode): self
180180
return $clone;
181181
}
182182

183-
public function withAllowReserved(bool $allowReserved): self
183+
public function withAllowReserved(?bool $allowReserved): self
184184
{
185185
$clone = clone $this;
186186
$clone->allowReserved = $allowReserved;

0 commit comments

Comments
 (0)