mix rendro.api.gen (Rendro v1.0.0) (adapter)

Copy Markdown View Source

Introspects all public Rendro modules for their tags: [:stable|:adapter] annotation and writes priv/public_api.json.

Run this task after changing module tiers (adding/removing tags: [:stable] or tags: [:adapter] to @moduledoc attributes). The generator reads live BEAM metadata via Code.fetch_docs/1 so results reflect the last compile.

The output is deterministic: running this task twice produces byte-identical output. Module keys and function/type lists are sorted alphabetically so the file can be diffed and committed without spurious ordering changes.

Conditional adapters (Threadline, Mailglass, Accrue, Phoenix, Oban.RenderWorker) are recompiled before introspection to ensure they appear in the manifest when their optional dependencies are present.

Usage

mix rendro.api.gen

Output

Writes priv/public_api.json — a schema-validated manifest of all public Rendro modules with their tier assignment, public functions, and public types. This file is checked in and serves as the canonical source of truth for the public API surface (API-01). Phase 79's contract test regenerates it in-memory and asserts equality to enforce surface drift detection.