module

Pika::Docs

Serves interactive API documentation powered by Scalar.

Mount via the docs macro on any Pika::API subclass:

class MyAPI < Pika::API info title: "My API", version: "1.0.0" docs at: "/docs" end

GET /docs → Scalar HTML UI GET /docs/openapi.json → OpenAPI 3.1 JSON spec

Class methods

scalar_html(spec_url : String) : String
Source