@if(count($endpoint->headers))
{{ u::trans("scribe::endpoint.headers") }}
@foreach($endpoint->headers as $header => $value)
@component('scribe::themes.elements.components.field-details', [
'name' => $header,
'type' => null,
'required' => false,
'description' => null,
'example' => $value,
'endpointId' => $endpoint->endpointId(),
'component' => 'header',
'isInput' => true,
])
@endcomponent
@endforeach
@endif
@if(count($endpoint->urlParameters))
{{ u::trans("scribe::endpoint.url_parameters") }}
@foreach($endpoint->urlParameters as $attribute => $parameter)
@component('scribe::themes.elements.components.field-details', [
'name' => $parameter->name,
'type' => $parameter->type ?? 'string',
'required' => $parameter->required,
'description' => $parameter->description,
'example' => $parameter->example ?? '',
'enumValues' => $parameter->enumValues,
'endpointId' => $endpoint->endpointId(),
'component' => 'url',
'isInput' => true,
])
@endcomponent
@endforeach
@endif
@if(count($endpoint->queryParameters))
{{ u::trans("scribe::endpoint.query_parameters") }}
@foreach($endpoint->queryParameters as $attribute => $parameter)
@component('scribe::themes.elements.components.field-details', [
'name' => $parameter->name,
'type' => $parameter->type,
'required' => $parameter->required,
'description' => $parameter->description,
'example' => $parameter->example ?? '',
'enumValues' => $parameter->enumValues,
'endpointId' => $endpoint->endpointId(),
'component' => 'query',
'isInput' => true,
])
@endcomponent
@endforeach
@endif
@if(count($endpoint->nestedBodyParameters))
{{ u::trans("scribe::endpoint.body_parameters") }}
@component('scribe::themes.elements.components.nested-fields', [
'fields' => $endpoint->nestedBodyParameters,
'endpointId' => $endpoint->endpointId(),
])
@endcomponent
@endif
@if(count($endpoint->responseFields))
{{ u::trans("scribe::endpoint.response_fields") }}
@component('scribe::themes.elements.components.nested-fields', [
'fields' => $endpoint->nestedResponseFields,
'endpointId' => $endpoint->endpointId(),
'isInput' => false,
])
@endcomponent
@endif