Elixir Generator Attributes

Here’s the list of attributes that affect Elixir code generation.

Attribute

Type

Inheritance

Target

Description

Default

enabled

bool

scope

module,
type
Enables code generation for
the module or type

true

file

string

module

Override generated file name

name

string

module
type
service
record field
enum field

Override generated type name

alias

string

type

Do not generate a type but use
existing type definition

tuple

bool

record

Generate Elixir tuple type
for the record

false

record

bool

record

Generate Elixir record type
for the record

false

map

bool

record

Generate Elixir map type
for the record

false

tagged

bool

scope

union
union clause
Represent union clauses as
{:clause, value} tuples

true

exception_message

string

exception

Override exception message

json.custom

string

type

Custom JSON serializer module
exporting from_json! and
to_json! functions

json.compatible

bool

type

Skip JSON serialization as
type’s JSON representation is
identical with Elixir values

false

string.custom

string

type

Custom string serializer module
exporting from_string! and
to_string! functions