thunderbird / thunderbird-notifications

In-App notifications for Thunderbird
Mozilla Public License 2.0
0 stars 0 forks source link

Add json validation to yaml->json pipeline #3

Closed malini closed 1 month ago

malini commented 4 months ago

Chris proposed the idea of adding a json validator run against the yaml->json converted files to ensure they match our expected fields, and fail otherwise.

radishmouse commented 4 months ago

Here's what I did locally and should be easy(?) to run as a GH action:

Using a tool written in Go: https://github.com/santhosh-tekuri/jsonschema

jv schema.json example.json

No output means both the schema and the data file are valid.

For local dev only (not part of GH action), hot reloading on file change: https://github.com/eradman/entr:

ls *.json | entr -c jv schema.json example.json