Overview
The docs UI route (/docs/api by default) can be rendered by three built-in renderers. All of them load the same OpenAPI document from the JSON route of the current API.
Pick one with
geni.renderer:
config/geni.php
Per-API Renderer
Each entry ofgeni.apis can choose its own renderer. APIs without a renderer key use the global geni.renderer:
config/geni.php
Built-in Portal (blade)
The default renderer is a standalone Blade, Tailwind and Alpine.js portal with live search, syntax highlighting, the interactive version switcher and a Try It console.
config/geni.php
- The Tailwind Play CDN and Alpine.js URLs are pinned. The docs login page uses the same URLs.
custom_cssis injected into the page’s<style>element; it cannot close that element.
API Overview
When the URL has no endpoint hash, the portal opens on an API overview showing the title, version andinfo.description of the document. Clicking the API title in the sidebar returns to it. Multi-line descriptions keep their line breaks.
Markdown Descriptions
The API overview, operation descriptions and response descriptions are rendered as Markdown by a small, escaping-first renderer. It supports:- Paragraphs and headings
- Bulleted and numbered lists
- Fenced code blocks and inline
code - Bold and italic
- Links with
http(s)or relative URLs
Scalar (scalar)
config/geni.php
- By default Geni loads
https://cdn.jsdelivr.net/npm/@scalar/api-reference@1.72.3/dist/browser/standalone.js. configurationis passed toScalar.createApiReference()as-is (for exampletheme,layout,hideModels). Geni setsurlto the current API’s JSON route andthemetolaravelunless you override it.
Stoplight Elements (elements)
config/geni.php
@stoplight/elements@9.0.25 build from jsDelivr:
- Script:
https://cdn.jsdelivr.net/npm/@stoplight/elements@9.0.25/web-components.min.js - Stylesheet:
https://cdn.jsdelivr.net/npm/@stoplight/elements@9.0.25/styles.min.css
Self-Hosting Assets
Scalar and Elements load pinned CDN builds. To serve them from your own domain (for example under a strict Content Security Policy), download the files and pointscript_url (and stylesheet_url for Elements) at your copies:
config/geni.php
Custom Renderers
geni.renderer (or an API’s renderer) may also be a class name implementing Geni\Laravel\Renderer:
blade renderer.
Renderers only change the UI. Access rules (
restrict_to_local, the viewApiDocs gate, docs_auth) apply to every renderer. See Documentation Authentication.