Expand description
Gleam type and JSON codec generation from project schemas.
Gleam type + JSON codec generation from a workflow project’s JSON
Schemas (aion codegen).
codegen_project reads a project’s workflow.toml and every
schemas/*.json, and writes one deterministic Gleam module
(src/<package>_io.gleam) containing a type plus an encoder/decoder
pair per schema — the schema files stay the single source of truth, and
the generated codecs cannot drift from them. CodegenMode::Check
verifies the on-disk module instead of writing, for CI gates. The
library never spawns processes; everything observable is in the returned
CodegenReport or CodegenError.
Structs§
- Codegen
Report - Result of a successful codegen run.
Enums§
- Codegen
Error - Errors produced while generating Gleam types and codecs from a workflow project’s JSON Schemas.
- Codegen
Mode - What to do with the generated module.
Functions§
- codegen_
project - Generates Gleam types and JSON codecs for every
schemas/*.jsonof the workflow project atroot, writing or checkingsrc/<package>_io.gleampermode.