Object schemas for Webhook events.
.
├── data # json data for generating and updating yaml schema
├── _all.yml # Groups models together for docs
├── store_app_uninstalled.yml # Individual email template models
├── ...To generate a new model from json data and overwrite the existing schema file:
- Copy and paste webhook event
jsoninto corresponding file indata/. - Use
models/json2schema.pyto convert the json data to a yaml schema.
Example:
cat data.json | python json2schema.py > schema.ymlBash for overwriting all webhook event models:
for f in models/webhooks/data/*.json; do cat $f | python models/json2schema.py > ${f%.*}.yml; mv ${f%.*}.yml models/webhooks/; done