The Real Fullstack

The Broken API Contract

All tests passed and the web app is fine. Why are Android crashing, iOS showing blank names and a partner getting 400s?

مهندس9 دقيقةمختبر تصحيح الأخطاءتحدي الشيفرة
restopenapijavatypescriptkotlin

لم يُترجم هذا التحدي إلى العربية بعد. أنت تقرأ النسخة الإنجليزية.

المهمة:Identify the root cause from the evidence, restore every client without rolling back the feature, and prevent it from happening again.السياق · أهداف التعلّم ▾

Brightcart released orders-api 3.0 together with the web app. The release renamed a field, added an enum value and made a request field mandatory. Mobile apps can't be updated instantly, and a logistics partner integrates directly.

المهمة: Identify the root cause from the evidence, restore every client without rolling back the feature, and prevent it from happening again.

أهداف التعلّم

  • Recognise breaking changes: renames, new enum values, new required fields.
  • Evolve an API in a backward-compatible way.
  • Catch incompatibilities before deploy with contract tests.
المحاكاةمحاكاة
orders-api 3.0Web app (new)Android 2.8iOS 4.1Logistics partner
تشغيل المحاكاة
public record OrderDto(    String fullName,    @Deprecated(forRemoval = true) String customerName,   // keep old field until old clients are gone    OrderStatus status) {}// v1 clients (header Accept-Version: 2.x) get a status they understandOrderStatus statusFor(ApiVersion v, OrderStatus s) {  return v.before("3.0") && s == PARTIALLY_SHIPPED ? SHIPPED : s;}// CreateOrderRequest.deliveryWindow: optional, default = next available window

تبسيط

Each fix maps to the symptoms it resolves. Real migrations also need deprecation timelines and usage metrics per client version. نموذج تعليمي — الأرقام توضّح سلوكًا وليست قياسات أداء.

المفاهيم

تحديات ذات صلة

المراجع