{# Bengal OpenAPI Endpoint Page (Hero Template) ============================================= Full endpoint documentation with three-column explorer layout. The primary template for individual REST API endpoints. Context: - element: DocElement with OpenAPIEndpointMetadata - page: Page object - section: Section for navigation - site: Site instance - config: Config instance Kida Features: - {% match %} for HTTP method and status code styling - {% with %} for nil-resilient optional sections - {% cache %} for expensive response rendering - {% spaceless %} for compact badge output - Optional chaining (?.) and null coalescing (??) #} {% extends 'autodoc/openapi/layouts/explorer.html' %} {% let meta = element?.typed_metadata ?? element?.metadata ?? {} %} {% let http_method = meta?.method ?? 'GET' %} {% let endpoint_path = meta?.path ?? '/' %} {% let operation_id = meta?.operation_id %} {% let summary = meta?.summary ?? element?.description ?? '' %} {% let is_deprecated = meta?.deprecated ?? false %} {% let parameters = meta?.parameters ?? () %} {% let request_body = meta?.request_body %} {% let responses = meta?.responses ?? () %} {% let security = meta?.security ?? () %} {% let tags = meta?.tags ?? () %} {# Group parameters by location #} {% let path_params = parameters |> where('location', 'path') %} {% let query_params = parameters |> where('location', 'query') %} {% let header_params = parameters |> where('location', 'header') %} {% let cookie_params = parameters |> where('location', 'cookie') %} {% block header %} {# Playground Bar: Method + Path + Copy #} {% let method = http_method %} {% let path = endpoint_path %} {% let deprecated = is_deprecated %} {% include 'autodoc/openapi/partials/playground-bar.html' %} {# Endpoint Header #} {% include 'autodoc/openapi/partials/endpoint-header.html' %} {% end %} {% block content_main %}