A schema mismatch occurs when one service expects a data structure that another service supplies differently. Serialization turns in-memory objects into network bytes and reconstructs them on the receiving side, so mismatches can hide inside that transformation. section 12.2
Investigate mismatches by asking what changed and how the receiver interprets it:
- Check whether a new JSON field is silently ignored by an older model. section 12.2
- Check whether renamed Protobuf enums or non-optional fields alter compatibility. section 12.2
- Look for dropped data, default values, or deserialization errors that appear only in particular circumstances. section 12.2
message Order {
int64 id = 1;
string customer_id = 2;
repeated string items = 3;
optional string notes = 4;
}
Use a small Protobuf schema to inspect how fields, optionality, and repeated values form a contract between services. section 12.2
Forward and backward compatibility let services evolve independently without accidentally breaking communication. Protobuf supplies stricter contracts than JSON or XML, but schema-based contracts still require careful evolution. section 12.2
