Avrogen.Schema.SchemaModule behaviour (avrogen v1.1.0)

Copy Markdown View Source

Common behaviour for modules that define avro schemas in code.

Summary

Callbacks

The actual schema, but as an elixir list, so it can be 'imported' into other schemas.

The actual schema, i.e. a json-string.

The schema's name, used for creating a file name.

Callbacks

avro_schema_elixir()

@callback avro_schema_elixir() :: [map()]

The actual schema, but as an elixir list, so it can be 'imported' into other schemas.

avsc()

@callback avsc() :: String.t()

The actual schema, i.e. a json-string.

schema_name()

@callback schema_name() :: String.t()

The schema's name, used for creating a file name.