AshBaml.TypeGenerator (ash_baml v0.2.0)
View SourceGenerates Ash type module definitions from BAML type metadata.
This module takes parsed BAML type information and produces Elixir code for Ash.TypedStruct and Ash.Type.Enum modules.
Summary
Functions
Generates an Ash.Type.Enum module definition from a BAML enum.
Generates an Ash.TypedStruct module definition from a BAML class.
Functions
Generates an Ash.Type.Enum module definition from a BAML enum.
Parameters
enum_name- String name of the BAML enumvariants- List of variant stringstarget_module- Module name for the generated typeopts- Options including:source_file
Returns
- String containing the complete module definition
Generates an Ash.TypedStruct module definition from a BAML class.
Parameters
class_name- String name of the BAML classclass_def- Map with "fields" and "dynamic" keystarget_module- Module name for the generated typeopts- Options including:source_file
Returns
- String containing the complete module definition