Schema validation checks data or schema definitions against structural and compatibility rules. In distributed systems, it catches serialization mismatches before changed schemas reach consumers. section 12.2
Use automated validation in startup checks or CI to compare the current schema with an earlier version.
- Treat adding an optional field as usually safe because older clients can ignore it. section 12.2
- Flag removed or renamed fields and type changes, such as changing a string to an integer, as likely breaking changes. section 12.2
- Fail the CI job when compatibility checks find changes that could break existing consumers. section 12.2
message Order {
int64 id = 1;
string customer_id = 2;
repeated string items = 3;
optional string notes = 4;
}
Use the Protobuf schema as the current artifact, then compare it with a previous version using compatibility checks. section 12.2






