diff --git a/src/Lib/OpenApi/Parameter.php b/src/Lib/OpenApi/Parameter.php index 46378687..e705f0e9 100644 --- a/src/Lib/OpenApi/Parameter.php +++ b/src/Lib/OpenApi/Parameter.php @@ -40,7 +40,11 @@ public function toArray() : array public function jsonSerialize() { - return $this->toArray(); + $vars = $this->toArray(); + if (empty($vars['description'])) { + unset($vars['description']); + } + return $vars; } /**