cdevents / spec

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

Validate schemas and fix them accordingly #220

Closed afrittoli closed 4 months ago

afrittoli commented 4 months ago

Changes

Add validation of jsonschemas to our CI. The links and embeddedlinks schemas where invalid, as well as the references to them from the event schemas, so fixing all those to let CI pass.

Switch to ajv for example validation, which allows for validation of both JSON documents as well as schemas.

ajv let users load references schemas from files into the tool offline databases, which enables offline validation of unpublished schemas.

Since ajv is javascript, update the GitHub action workflow to javascript.

Fixes: #208 Fixes: #211

Cherry-pick of #219

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Version Notes

Event Versions

All event schemas have been updated to fix the $ref to the links schemas. Normally this would require bumping all event versions, and we do that in the main branch for v0.5.0.

However, for this patch release, consider the following points:

I think that for v0.4.1 it's not worth bumping event versions again. We should instead focus on getting all v0.4.1 fixed merged soon-ish, so that we may make a new release and finish the work on the SDKs.

Spec Version

The spec version has to be bumped to v0.4.1. Since we will need several PRs for v0.4.1, I propose that all PRs do not update versions, and we make the version update in one last PR before releasing.