@php use Knuckles\Scribe\Tools\Utils as u; /** @var Knuckles\Camel\Output\OutputEndpointData $endpoint */ @endphp
@component('scribe::components.badges.auth', ['authenticated' => $endpoint->isAuthed()]) @endcomponent
{!! Parsedown::instance()->text($endpoint->metadata->description ?: '') !!}{{ u::trans("scribe::endpoint.example_request") }}:@foreach($metadata['example_languages'] as $language)
@if(count($response->headers)){{ u::trans("scribe::endpoint.example_response") }} ({{ $response->fullDescription() }}):
@foreach($response->headers as $header => $value)
{{ $header }}: {{ is_array($value) ? implode('; ', $value) : $value }}
@endforeach
@if(is_string($response->content) && Str::startsWith($response->content, "<@endforeach @endif>")) {!! u::trans("scribe::endpoint.responses.binary") !!} - {{ htmlentities(str_replace("<
@elseif($response->status == 204)>", "", $response->content)) }} {!! u::trans("scribe::endpoint.responses.empty") !!}
@else @php($parsed = json_decode($response->content)) {{-- If response is a JSON string, prettify it. Otherwise, just print it --}}{!! htmlentities($parsed != null ? json_encode($parsed, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) : $response->content) !!}
@endif
{{ u::trans("scribe::try_it_out.received_response") }}:
" style="max-height: 400px;">
{{ u::trans("scribe::try_it_out.request_failed") }}:
{{ "\n\n".u::trans("scribe::try_it_out.error_help") }}