Skip to content

Commit d1abfc0

Browse files
soyukaMrSrsen
andauthored
fix(openapi): nullable default values in operation openapi definition (#7321)
Co-authored-by: Martin Sršeň <[email protected]>
1 parent 2e6911c commit d1abfc0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Metadata/Extractor/XmlResourceExtractor.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ private function buildOpenapi(\SimpleXMLElement $resource): bool|OpenApiOperatio
224224
in: $this->phpize($parameter, 'in', 'string'),
225225
description: $this->phpize($parameter, 'description', 'string'),
226226
required: $this->phpize($parameter, 'required', 'bool'),
227-
deprecated: $this->phpize($parameter, 'deprecated', 'bool'),
228-
allowEmptyValue: $this->phpize($parameter, 'allowEmptyValue', 'bool'),
229-
schema: isset($parameter->schema->values) ? $this->buildValues($parameter->schema->values) : null,
227+
deprecated: $this->phpize($parameter, 'deprecated', 'bool', false),
228+
allowEmptyValue: $this->phpize($parameter, 'allowEmptyValue', 'bool', null),
229+
schema: isset($parameter->schema->values) ? $this->buildValues($parameter->schema->values) : [],
230230
style: $this->phpize($parameter, 'style', 'string'),
231-
explode: $this->phpize($parameter, 'explode', 'bool'),
232-
allowReserved: $this->phpize($parameter, 'allowReserved', 'bool'),
231+
explode: $this->phpize($parameter, 'explode', 'bool', false),
232+
allowReserved: $this->phpize($parameter, 'allowReserved', 'bool', null),
233233
example: $this->phpize($parameter, 'example', 'string'),
234234
examples: isset($parameter->examples->values) ? new \ArrayObject($this->buildValues($parameter->examples->values)) : null,
235235
content: isset($parameter->content->values) ? new \ArrayObject($this->buildValues($parameter->content->values)) : null,

0 commit comments

Comments
 (0)