cdevents / spec

A common specification for Continuous Delivery events
Apache License 2.0
129 stars 22 forks source link

Introduce code gen'ing of various files #170

Open xibz opened 10 months ago

xibz commented 10 months ago

Currently when a new field is needed to be added to the context, the author must add the field many times which is not a great experience. Further, the current examples folder serves two purposes: testing and examples. When the SDKs run its testing processes, it will utilize the examples folder to ensure things are generated correctly. This makes adding useful examples for end users more difficult as it needs to adhere to a strict format.

So with these two issues, I believe we can introduce code gen'ing to better the experience of authors and end users who are interested in looking at examples.

  1. Add a tool to code gen schemas
  2. Use the same tool to generate examples
  3. Add a new testing folder for the purpose of tests
  4. Generate test payloads using the same code gen'ing tool

A proposal will need to be written to outline what the new directory structure will look like and any new tool that needs to be added.