Skip to content

Commit 2328fe9

Browse files
committed
fixed missing constraints in parameters
1 parent c6aa58b commit 2328fe9

2 files changed

Lines changed: 175 additions & 0 deletions

File tree

app/helpers/Swagger/AnnotationParameterData.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ private function generateSchemaAnnotation(): string
116116

117117
$body->addKeyValue("type", $this->swaggerType);
118118
$body->addKeyValue("nullable", $this->nullable);
119+
120+
if ($this->swaggerType !== "array") {
121+
$this->constraints?->addConstraints($body);
122+
}
123+
119124
$this->addArrayItemsIfArray($body);
120125

121126
return $head . $body->toString();

0 commit comments

Comments
 (0)