Schema class generation tools
In order to simplify the usage of serialization schemas, native classes for the programming language of choice can often be generated.
As a serialization schema can be used in many languages (i.e. sending events from a Java application, and receiving with a NodeJS application), consistency is key between the events that are serialized and deserialized.
Therefore, it is useful to generate classes for serialization schemas. Stream Machine offers utilities to make this process easier.
The repository for the class generation tools can be found here. To use the tools, follow these steps:
Clone the repository:
git clone https://github.com/streammachineio/schema-tools
Navigate to the root of the repository
Ensure you have the full reference to the serialization schema for which you want to generate classes, i.e.
Generate the classes:
python -m cli generate typescript avro "streammachine/clickstream/0.2.0"
Find the generated classes under the
|The schema generation tools repository is a work in progress and features will be added over time|
|Known schemas can be requested via the public API, which is not yet available in the CLI|
The generated classes can be seen as a starter project, which can be included in your existing project. Another option would be to publish the resulting generated projects as a single artifact to your own artifactory (i.e. Maven / PyPi / NPM / et cetera), and use that as a dependency in your application that will be sending events.