{
  "id": "python/fastapi-openapi-schema-generation-failed",
  "signature": "fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'typing.Any'> is a valid Pydantic field type.",
  "signature_zh": "fastapi.exceptions.FastAPIError: 响应字段参数无效！提示：检查 <class 'typing.Any'> 是否为有效的 Pydantic 字段类型。",
  "regex": "fastapi\\.exceptions\\.FastAPIError:\\ Invalid\\ args\\ for\\ response\\ field!\\ Hint:\\ check\\ that\\ <class\\ 'typing\\.Any'>\\ is\\ a\\ valid\\ Pydantic\\ field\\ type\\.",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "A route used a return annotation or response_model of Any or an unsupported type, which Pydantic cannot build a schema for.",
  "root_cause_type": "generic",
  "root_cause_zh": "路由使用了 Any 或不支持类型的返回注解或 response_model，Pydantic 无法为其构建 schema。",
  "versions": [
    {
      "version": "0.100+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disables OpenAPI schema; clients lose typed documentation.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Pydantic still rejects Any in response models.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "class ItemOut(BaseModel):\n    id: int\n    name: str\n@app.get('/items', response_model=list[ItemOut])\nasync def items(): ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "@app.get('/raw', response_class=JSONResponse)\nasync def raw() -> dict: ...",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}