Skip to content

Schema

A schema defines the structure which all of the message payloads within a topic must conform to. The schema also defines/describes the custom elements/variables specific to the topic. The Event Service has simplified the CloudEvent + AsyncAPI spec removing all unnecessary fields and structure. This spec accepts JSON and Avro format, and is fully defined in the below document:

The best way to create a new schema is to start with the above reference document. Find an example that most closely matches your use case, then adapt the example to meet your requirements. Save this out as your event topic schema.

Publishers are also able to define a separate data schema. Both schemas are stored within the Event Service registry which is accessible via the [Events Registry API](https://console.trimble.com/home/marketplace/product/Events Registry “https://console.trimble.com/home/marketplace/product/Events Registry”){:target=“_blank”}. See more on the Events Registry page.