ZoiForge.Generator (ZoiForge v0.1.0)

Copy Markdown View Source

Core schema-to-module generator for ZoiForge.

Scans a source directory for *.schema.json files, converts each JSON Schema into a typed Elixir module backed by Zoi, and writes formatted source files to the configured output directory.

Summary

Functions

Runs code generation with the given config struct or keyword options.

Functions

run(config_or_opts)

@spec run(ZoiForge.Config.t() | keyword()) ::
  {:ok, [{String.t(), String.t()}]} | {:error, term()}

Runs code generation with the given config struct or keyword options.

Returns {:ok, generated} where generated is a list of {module_name, output_path} tuples in deterministic order.