Creating libraries for data generators
As well as making it easy for data generators to provision and manage resources, we can also make it easy for them to generate and publish their data to those resources. One way to do that is to supply some client libraries. These can help with data conversion, perform validation checks, or perform custom logic that helps ensure data generated by different services is consistent.
These client libraries are also useful to the consumers of the data, helping with the deserialization of data or the deduction of any custom logic.
You could decide to implement these libraries yourself, using the raw data contract as the input. Alternatively, you can convert the data contract into an open source format and use the existing ecosystem.
That’s what we’ll be doing. In this section, we’ll convert our data contract to JSON Schema (https://json-schema.org) and learn how to use existing libraries to validate our data, as highlighted...