# fastapi.exceptions.RequestValidationError: 1 validation error for Request
body -> field_name
  field required (type=value_error.missing)

- **ID:** `python/fastapi-request-validation-error-field-required`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

客户端请求体缺少 Pydantic 模型定义的必需字段

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **在请求体中包含所有必需字段** (95% success)
   ```
   {"field_name": "value", "other_field": 123}
   ```
2. **在 Pydantic 模型中为字段设置默认值** (90% success)
   ```
   from pydantic import BaseModel
class Item(BaseModel):
    field_name: str = "default"
   ```

## Dead Ends

- **在请求头中添加 Content-Type 但不修改请求体** — 字段缺失的根本问题未解决，验证依然失败 (90% fail)
- **将字段类型改为 Optional 而不更新文档** — 改变了接口契约，可能导致前端与后端不一致 (60% fail)
