For AI agents: the complete documentation index is available at /hclapi/llms.txt, the full documentation bundle is available at /hclapi/llms-full.txt, and this page is available as Markdown at /hclapi/docs/steps/docs.md.

docs

The docs step renders an interactive API documentation portal directly from the compiled OpenAPI 3.1 specification. It is a terminal step that completes the request pipeline.

route "GET /docs" {
  docs {
    renderer = "scalar"
    spec_url = "/openapi.json"
  }
}

Attributes

AttributeTypeDefaultDescription
rendererstring"scalar"UI viewer: "scalar", "swagger", "redoc", or "elements"
spec_urlstring"/openapi.json"Path to the OpenAPI JSON or YAML endpoint
titlestringconfigured titleCustom portal page title
templatestring""Path to a custom HTML template file on disk

Routes using docs are automatically excluded from the generated OpenAPI specification catalog so documentation viewers won't pollute your API contracts.