no-create-verb-in-post-path
POST routes name their collection instead of ending in a create, add or new segment.
Why
The HTTP method already states the action. A trailing create, add or new segment turns a resource API into ad hoc RPC names, so clients cannot predict paths and PUT, PATCH and DELETE lose their pairing.
Fix
POST to the collection path, use PUT on the item path for an upsert and PATCH for a partial update.
Examples
from fastapi import APIRouter
router = APIRouter()
@router.post("/tickets/create")async def create_ticket() -> None: return Nonefrom fastapi import APIRouter
router = APIRouter()
@router.post("/tickets")async def create_ticket() -> None: return None