# pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.CallableSchema

- **ID:** `python/pydantic-json-schema-mode`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A field is typed as Callable, which has no JSON schema representation. Calling model_json_schema() raises.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |

## Workarounds

1. **** (80% success)
   ```
   from pydantic import BaseModel, Field
from typing import Callable
class M(BaseModel):
    model_config = {'json_schema_extra': {'examples': []}}
    handler: Callable = Field(exclude=True)
   ```
2. **** (85% success)
   ```
   class M(BaseModel):
    handler_name: str  # resolved at runtime via registry
   ```

## Dead Ends

- **** — Loses validation; JSON schema becomes empty object with no guidance. (50% fail)
- **** — Breaks OpenAPI docs and client SDK generation for the whole app. (60% fail)
- **** — Security risk and still no schema for the callable's shape. (70% fail)
