...
This version number is found in the Json event schema under the schema property.
Schema Property Type
In order for a given event instance to be produced by a previous event schema definition and read by a future event schema definition (backward compatibility), the schama schema version from the schema definition cannot be a constant anymore.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "schema": "urn:cps:org.onap.cps:data-updated-event-schema:v1", "id": "77b8f114-4562-4069-8234-6d059ff742ac", ... |
Conclusion
The minimal changes proposed above still give the option to make a forward compatible change in next coming release after Istanbul without introducing all the complexity coming with a complete solution right now, with the current design.
During Jakarta release the team would be able to consider other ways to implement event schema classes (currently automatically generated). Being able to rework the design of these classes could simplify the complete solution implementation for schema evolution if needed.
Note:
For future design work related to this subject, here is a Jackson reference to be looked at for event classes hierarchyReference note lo look at Jackson classes hierarchy for event classes: https://www.baeldung.com/jackson-inheritance