Replies: 1 comment 1 reply
-
Hello, By default, any additional properties are allowed in JsonSchema according to the documentation. Backward compatibility requires data written in the old schema can still be read by the new schema. In this case, the data written by your old schema can potentially have a field with the same name I would suggest setting Let me know if this helps or you have any other questions. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@blacktooth
@hhkkxxx133
The diffType enum 'OBJECT_TYPE_PROPERTY_SCHEMAS_MEMBER_ADDED' is marked as backwards incompatible in the library. This diff type corresponds to an addition of a new optional field in the Json schema. Example:
Old schema:
Added a new optional field 'reasonCode' in the New schema:
Old sample data is compatible with both old and new schema which should make the schema update backwards compatible by definition.
Wanted to understand the reason behind marking 'OBJECT_TYPE_PROPERTY_SCHEMAS_MEMBER_ADDED' as backwards incompatible. Is it a bug or is it expected behaviour?
References:
apicurio-registry/schema-util/json/src/main/java/io/apicurio/registry/rules/compatibility/jsonschema/diff/DiffType.java
Line 76 in eab9faf
Beta Was this translation helpful? Give feedback.
All reactions