Mix.UOF.XSD.Generator (UOF_API v2.0.0)

Copy Markdown View Source

Turns the UOF.XSD intermediate representation into Ecto embedded-schema source code (one module per complexType), mirroring the XSD nesting faithfully.

Design decisions (see project memory):

  • xs:decimal and the odds/probability fields -> Ecto.Decimal
  • date/time fields -> :date / :utc_datetime
  • field names follow the XSD, except for entries in @rename_overrides

Summary

Functions

Generate source for every ComplexType in types.

Functions

generate(types, namespace)

Generate source for every ComplexType in types.

Returns a list of {short_name, source} tuples where short_name is the module name relative to namespace (e.g. "Event").