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:
[x] Has the primer doc been updated if a design decision is involved
[x] Have the JSON schemas been updated if the specification changed
[x] Has spec version and event versions been updated according to the versioning policy
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:
All event versions were already bumped as part of v0.4.0
The v0.4.0 version was only recently released
No v0.4.0 SDK has been released yet
If anyone attempted to use v0.4.0 between release and now, they would have failed to use links because of the invalid schema $ref
If we bump event versions in this PR we will have to do so again when fixing the camel case, causing a lot of rebase pain for the PRs needed for v0.4.1
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.
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 themain
branch forv0.5.0
.However, for this patch release, consider the following points:
links
because of the invalid schema$ref
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.