{
  "id": "python/fastapi-route-order-shadowing",
  "signature": "AssertionError: Duplicate route path: /items/{item_id}",
  "signature_zh": "断言错误：重复的路由路径：/items/{item_id}",
  "regex": "AssertionError:\\ Duplicate\\ route\\ path:\\ /items/\\{item_id\\}",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Defining two routes with the same path but different methods or parameters, causing a conflict.",
  "root_cause_type": "generic",
  "root_cause_zh": "定义了具有相同路径但方法或参数不同的两个路由，导致冲突。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "FastAPI checks for duplicates regardless of order.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If the path is identical, it's still a duplicate.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "Use different paths for different endpoints: /items/{item_id} and /items/{item_id}/details",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Combine them into one route and handle logic based on method or query params",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2026-01-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}