oaspec/codegen/encoders

JSON encoder generation.

Split out of decoders.gleam so each module owns one direction of the codec pipeline — decoders produces decode.gleam, encoders produces encode.gleam. Shared traversal helpers (list_at_or, qualified_schema_ref_type) are intentionally duplicated rather than lifted into a third module; the helpers are small, the duplication is stable, and extracting a shared dispatch module is tracked as follow-up to #212.

Values

pub fn generate(
  ctx: context.Context,
) -> List(context.GeneratedFile)

Generate the encode.gleam module for the resolved spec.

Search Document