fastapi-crudrouter

How to define multiple API endpoints in FastAPI with different paths but the same path parameter?

How to define multiple API endpoints in FastAPI with different paths but the same path parameter? Question: I’m working on a project which uses FastAPI. My router file looks like the following: # GET API Endpoint 1 @router.get("/project/{project_id}/{employee_id}") async def method_one( project_id: str, organization_id: str, session: AsyncSession = Depends(get_db) ): try: return await CustomController.method_one( session, …

Total answers: 1