Remove the version enums from schemas #90
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
Including the spec version enums in schemas is problematic, because every time the spec is updated it implies that all the event schemas must be updated as well which in turn requires the event type versions to be updated too, which is confusing since not all events are updated when a new spec version is made.
To solve that issue, we remove the enum from the version property, a let it be a non-empty string. The SDKs can use the event type and version to download the schema and validate events.
When a new spec release is made, the $id in the schema of all events still have to be updated, but that should not cause the version on the event type to be updated.
Fixes #87
Signed-off-by: Andrea Frittoli [email protected]
Submitter Checklist
As the author of this PR, please check off the items in this checklist: