This work is inspired and very often copied from the work done by the Disney Streaming team on the smithy-translate project. Attribution is included on a per file basis.
The goal of this project is to provide a set of tools to translate Smithy models into Avro models.
This project is in the early stages of development. It is not ready for use.
This project uses sbt as its build tool. To build the project run the following command from the root of the project.
sbt compile
This project is broken into several modules. The modules are as follows: - core - avro - cli
The core module contains the core logic for translating Smithy models into Avro models. It also contains the logic for translating Smithy models into Avro schema files. See below for the mapping of Smithy shapes to Avro schema types.
The avro module is a Java project that contains the Smithy Traits
to enable and customize Avro generation.
The cli module is a Scala project that contains a simple command line interface for translating Smithy models into Avro models. It is built using decline
- java traits
- java validators
- service provider files
- smithy files
- simple cli
- scala avro model
- scala avro file model
- shape visitor for avro model
- shape visitor for avro file model
- blob -> Avro bytes
- boolean -> Avro boolean
- string -> Avro string
- byte -> Avro int
- short -> Avro int
- integer -> Avro int
- long -> Avro long
- float -> Avro float
- double -> Avro double
- bigInteger -> Avro Long
- bigDecimal -> Avro Decimal Logical type with a scale and precision defined by trait
- timestamp -> Avro Timestamp Logical type requires a trait to define the format
- document -> Avro String
- enum -> Avro Enum
- list -> Avro Array
- map -> Avro Map
- structure -> Avro Record
- union -> Avro Union
- service -> Avro Rpc
- @default -> Avro default
- @documentation -> Avro doc