@php $hasChildren ??= false; $isArrayBody = $name == "[]"; $expandable = $hasChildren && !$isArrayBody; @endphp
@if($expandable)
@endif @unless($isArrayBody)
{{ $name }}
@if($type)
{{ $type }}
@endif
@if($required)
required
@endif @endunless
@if($description)
{!! Parsedown::instance()->text($description) !!}
@endif @if(!empty($enumValues)) Must be one of:
{!! implode(" ", array_map(fn($val) => "
$val
", $enumValues)) !!}
@endif @if($isArrayBody)
array of:
@if($required)
required
@endif
@endif @if(!$hasChildren && !is_null($example) && $example != '')
Example:
{{ is_array($example) ? json_encode($example) : $example }}
@endif