A transit-fare consumer depends on specific fields from a fare-rules producer. How can consumer-driven contracts catch producer drift before production?
Select an answer to reveal the explanation.
Short Explanation
Let the rider’s actual needs write the checklist the ticket booth must pass. Consumer-driven contracts replay what the consumer depends on inside the producer’s build—stronger than a dusty OpenAPI nobody runs.
Full Explanation
Consumer-driven contracts catch producer drift by recording what the transit-fare consumer actually expects—requests and responses, including required fields—and replaying those expectations in the fare-rules producer’s pipeline. If the producer removes or renames a field the consumer depends on, the producer build fails before production. That approach is stronger than publishing documentation nobody executes, because the checklist is executable and owned by the real dependency.
Publishing only a producer OpenAPI file that no pipeline ever executes against the running producer fails by concept: an unread schema does not fail builds when the implementation drifts. Replacing the HTTP contract with an OCI Service Mesh policy redesign as the primary compatibility check fails because mesh policies address traffic security and routing, not field-level request/response expectations. Moving all compatibility checks into API Gateway authorizer redesign fails similarly: authorizers enforce identity and access, not consumer payload contracts.
Exam caveat: consumer-driven means the consumer’s expectations gate the producer—not the reverse documentation dump. Operational check: break a required fare field in a feature branch of the producer and confirm the consumer-driven contract job fails in CI before merge; restore the field and confirm green.