Implement Routes for Vehicles #193

Closed
opened 2026-01-19 22:50:08 +00:00 by duarteneves5 · 1 comment
duarteneves5 commented 2026-01-19 22:50:08 +00:00 (Migrated from github.com)

ATTENTION - Vehicle Repository is not yet implemented!!!! Needs to be implemented before this

Implement the REST endpoints for the Vehicle entity, connecting the API layer to the VehicleRepo.

Since the repository methods are currently empty (raising NotImplementedError), this task involves implementing the repository logic using Beanie/MongoDB before exposing the endpoints.

Technical Requirements:

  • File: src/routers/vehicles.py
  • Prefix: /vehicles
  • Tags: ["Vehicles"]
  • Dependency: Inject VehicleRepo using Depends().
  • Validation: Enforce unique License Plate and VIN constraints.

Exception Mapping Strategy:

  • VehicleNotFoundError -> 404 Not Found
  • DuplicateVehicleError (License Plate/VIN) -> 409 Conflict
  • VehicleDatabaseError -> 500 Internal Server Error

TDD Checklist:

ATTENTION - Vehicle Repository is not yet implemented!!!! Needs to be implemented before this Implement the REST endpoints for the **Vehicle** entity, connecting the API layer to the `VehicleRepo`. Since the repository methods are currently empty (raising `NotImplementedError`), this task involves implementing the repository logic using Beanie/MongoDB before exposing the endpoints. **Technical Requirements:** - **File:** `src/routers/vehicles.py` - **Prefix:** `/vehicles` - **Tags:** `["Vehicles"]` - **Dependency:** Inject `VehicleRepo` using `Depends()`. - **Validation:** Enforce unique License Plate and VIN constraints. **Exception Mapping Strategy:** - `VehicleNotFoundError` -> **404 Not Found** - `DuplicateVehicleError` (License Plate/VIN) -> **409 Conflict** - `VehicleDatabaseError` -> **500 Internal Server Error** **TDD Checklist:** - [x] #194 - [x] #195 - [x] #196
AndreFerreira5 commented 2026-01-22 23:18:37 +00:00 (Migrated from github.com)

all the sub-issues have been implemented, closing...

all the sub-issues have been implemented, closing...
Sign in to join this conversation.
No description provided.