Validate schemas and fix them accordingly #220
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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.