Skip to content

Add Trailer API lifecycle collection - #58

Merged
roncodes merged 3 commits into
mainfrom
feature/trailer-api
Sep 9, 2026
Merged

Add Trailer API lifecycle collection#58
roncodes merged 3 commits into
mainfrom
feature/trailer-api

Conversation

@roncodes

@roncodes roncodes commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

Trailer API lifecycle coverage for the first-class Trailer feature (fleetbase/fleetops#309).

  • Trailer resource definition and object schema, including the additive relation identifiers (category_id, vendor_id, warranty_id, photo_id, vehicle_id), the always-present equipment, devices and connections collections, and the sanitized telematics snapshot.
  • Lifecycle requests: create, query, retrieve, update, track, attach, detach, connection history, vehicle trailer list, and delete.
  • Trailer Device and Equipment attachment, detachment, reassignment, verification and cleanup through the polymorphic attachable_type contract.
  • Query parameter documentation for the supported filters and with expansions.

Assertions

Assertions match the shipped responses: public IDs only (no *uuid keys), attachment_state, vehicle_id/trailer_id on connections, the attached state exposed by GET /vehicles/{id}/trailers, stored coordinates and connectivity after tracking, and the telematics snapshot without device identifiers. Every scenario captures its own identifiers into environment variables and cleans up the resources it creates.

Validation

  • npm run postman:lint: 5 collections validated, Fleetbase API 219 requests, 0 errors, 0 warnings.
  • The lifecycle was exercised against a local Fleetbase stack with the finalized fleetops branch (create, retrieve with expansions, attach with position conflicts and idempotent re-attach, detach twice, connections, vehicle trailer list, track including stale and null-island observations, delete guard).
  • Add first-class Trailer operations fleetops#309 pins its contract workflow to this revision (0590548).

Related PRs

- Create/retrieve assert the additive relation identifiers (vendor_id,
  category_id, vehicle_id), that unrequested relation objects stay absent,
  and that no private UUID keys leak.
- Towing assertions check vehicle_id/trailer_id on connections and the
  attached state exposed by the vehicle trailer list.
- Tracking asserts connectivity, stored coordinates and the sanitized
  telematics snapshot.
- Document the relation identifiers, embedded collections and the extra
  query filters and expansions.
@roncodes
roncodes merged commit 7fe06b7 into main Sep 9, 2026
1 check passed
@roncodes
roncodes deleted the feature/trailer-api branch September 9, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant