{
  "id": "python/fastapi-pydantic-validation-error",
  "signature": "pydantic.error_wrappers.ValidationError: 1 validation error for Item\nname\n  field required (type=value_error.missing)",
  "signature_zh": "Pydantic 验证错误：Item 的 name 字段必填。",
  "regex": "pydantic\\.error_wrappers\\.ValidationError:\\ 1\\ validation\\ error\\ for\\ Item\\\nname\\\n\\ \\ field\\ required\\ \\(type=value_error\\.missing\\)",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A Pydantic model field is required but not provided in the request.",
  "root_cause_type": "generic",
  "root_cause_zh": "Pydantic 模型字段是必填的，但请求中未提供。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Sending the field with a null value",
      "why_fails": "Null is not the same as a missing field; validation still fails.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using the wrong field name",
      "why_fails": "Field names must match exactly.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Include all required fields in the request body",
      "success_rate": 0.95,
      "how": "curl -X POST http://localhost:8000/items -H 'Content-Type: application/json' -d '{\"name\": \"item\"}'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Make the field optional with a default",
      "success_rate": 0.9,
      "how": "class Item(BaseModel):\n    name: str = 'default'",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-01-25",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}