Compatibility policies
A compatibility policy consists of rules Yandex Schema Registry uses to check the compatibility of the new schema with earlier versions at the namespace level.
You can select a compatibility policy when creating or updating the namespace. Compatibility policies are available for Protobuf
Protobuf schema compatibility policies
The following policies are available for Protobuf schemas:
-
Confluent
: Based on the best practices for the evolution of Protobuf schemas. For more info on schema evolution, see this Protobuf guide . -
buf
: Based on the Buf v1 standards. For more info on the applicable checks, see this specification .
JSON schema compatibility policies
The following policies are available for JSON schemas:
-
Confluent
: Follows the Confluent Schema Registry standards and implements mathematically accurate compatibility checks. This policy does not allow adding or removing optional parameters inobject
fields. In certain cases, such as when working with queues, this limitation may be excessive. -
Optional Friendly
: Based on a solution using various content models for the producer and the consumer. This option only involves registering the producer schema. The compatibility check involves converting the consumer schema from an open content model to a closed one and comparing it with the registered producer schemas. This enables you to add or remove optional parameters while maintaining full transitive compatibility.