Foundry.Context.ModuleContext (foundry v0.1.2)

Copy Markdown

The typed output struct for mix foundry.context <Module> --json.

This struct defines the JSON schema frozen at the end of Phase 1. Breaking changes require an ADR. The schema matches ADR-003 exactly.

All fields must be present in every output — use nil for absent optional values, not missing keys. Consumers depend on key presence, not key existence checks.

Summary

Types

money_attribute()

@type money_attribute() :: %{
  name: String.t(),
  type: String.t(),
  cldr_backend: String.t()
}

state_machine()

@type state_machine() :: %{
  present: boolean(),
  states: [String.t()],
  transitions: [%{from: String.t(), to: String.t(), action: String.t()}],
  state_attribute: String.t() | nil
}

test_coverage()

@type test_coverage() :: %{
  property_tests: boolean(),
  scenario_tests: boolean(),
  e2e_tests: boolean()
}