# AssertionError: Duplicate route path: /items/{item_id}

- **ID:** `python/fastapi-route-order-shadowing`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Defining two routes with the same path but different methods or parameters, causing a conflict.

## Version Compatibility

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

## Workarounds

1. **** (100% success)
   ```
   Use different paths for different endpoints: /items/{item_id} and /items/{item_id}/details
   ```
2. **** (90% success)
   ```
   Combine them into one route and handle logic based on method or query params
   ```

## Dead Ends

- **** — FastAPI checks for duplicates regardless of order. (60% fail)
- **** — If the path is identical, it's still a duplicate. (80% fail)
