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 inobjectfields. In certain cases, e.g., when working with queues, this limitation may be excessive. -
Optional friendly: Uses closed content model for the producer and open one, for the consumer, where only the producer schema is registered. 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 policy allows adding or removing optional parameters inobjectfields while maintaining full transitive compatibility. Learn more about how this policy works.