Description
Add field-level validation annotations on TelemetryPingDTO to reject structurally invalid requests before they reach the service layer. Without this, empty or malformed JSON can be saved directly to MongoDB.
Scope
- Add
@NotNull, @NotBlank on deviceId, storeId, itemId
- Add
@NotNull on lat, lng, accuracyMeters, timestamp
- Add
@Valid in the controller on the @RequestBody parameter
- Return a meaningful 400 Bad Request response on validation failure
Done When
Priority