Creates FastAPI endpoints following DataPilot conventions. Use when creating new API routes, routers, or endpoint functions in the backend.
Tout endpoint doit suivre ce pattern :
app/routers/<resource>.pyapp/services/<resource>_service.pyapp/schemas/<resource>.pyapp/models/<resource>.pycurrent_user.tenant_id (multi-tenant obligatoire)app/core/dependencies.py/api/v1/<resource>@router.get("/{id}", response_model=ResourceSchema)
async def get_resource(
id: UUID,
current_user: User = Depends(get_current_user),
db: Session = Depends(get_db)
):
service = ResourceService(db)
return service.get_by_id(id, tenant_id=current_user.tenant_id)