diff --git a/src/Support/Generator/Types/Type.php b/src/Support/Generator/Types/Type.php index 191335dfc..2f4cb4e0d 100644 --- a/src/Support/Generator/Types/Type.php +++ b/src/Support/Generator/Types/Type.php @@ -57,7 +57,8 @@ public function addProperties(Type $fromType) public function toArray() { return array_merge(array_filter([ - 'type' => $this->nullable ? [$this->type, 'null'] : $this->type, + 'type' => $this->type, + 'nullable' => $this->nullable, 'format' => $this->format, 'description' => $this->description, 'enum' => count($this->enum) ? $this->enum : null,