# fastapi.exceptions.FastAPIError: Invalid args for response field! Hint: check that <class 'typing.Any'> is a valid Pydantic field type.

- **ID:** `python/fastapi-openapi-schema-generation-failed`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A route used a return annotation or response_model of Any or an unsupported type, which Pydantic cannot build a schema for.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.100+ | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   class ItemOut(BaseModel):
    id: int
    name: str
@app.get('/items', response_model=list[ItemOut])
async def items(): ...
   ```
2. **** (85% success)
   ```
   @app.get('/raw', response_class=JSONResponse)
async def raw() -> dict: ...
   ```

## Dead Ends

- **** — Disables OpenAPI schema; clients lose typed documentation. (60% fail)
- **** — Pydantic still rejects Any in response models. (80% fail)
