oaspec/codegen/server

Values

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

Generate server stub files.

Issue #247 splits the handler surface in two:

  • handlers.gleam carries user-editable panic stubs and is emitted only on first generation (SkipIfExists). Re-running oaspec generate leaves it alone, so user implementations survive regeneration.
  • handlers_generated.gleam is a sealed delegator that router.gleam imports. Each operation forwards to handlers.<op_name>(req). It is always overwritten so the wiring stays in lock-step with the spec.
Search Document