{# Bengal OpenAPI Schema Page ========================== Standalone schema/model documentation page. Displays JSON Schema object structure with examples. Context: - element: DocElement with OpenAPISchemaMetadata - page: Page object - section: Section for navigation - site: Site instance - config: Config instance Kida Features: - {% with %} for nil-resilient optional sections - {% cache %} for expensive schema rendering - Optional chaining (?.) and null coalescing (??) #} {% extends 'autodoc/openapi/layouts/reference.html' %} {% let meta = element?.typed_metadata ?? element?.metadata ?? {} %} {% let schema_name = element?.name ?? page?.title ?? 'Schema' %} {% let schema_type = meta?.schema_type ?? 'object' %} {% let properties = meta?.properties ?? {} %} {% let required_props = meta?.required ?? () %} {% let enum_vals = meta?.enum %} {% let example_val = meta?.example %} {% let description = element?.description ?? '' %} {% block header %}
{{ schema_name }}
{{ schema_type }}
{{ val }}
{% end %}
{{ example | tojson(indent=2) }}