This block of code in src/Utilities/Arr.php
recursively omits all array keys that have null
values
if (is_array($value)) {
$value = static::filter($value);
continue;
}
When building OAS documentation, you often want to keep keys with null
values to show that, for example, a return value in an API response payload may contain null
values but still include the keys for those values.
My team has forked this repo as well as the vyuldashev/laravel-open-api package employing this one in order to get around the issue and correctly generate our Open API docs. In the fork we have commented out this block of code.