Postman

The collection lives at public/dobby-postman-collection.json (auto-generated by bun run postman:build and served by the unified server at /dobby-postman-collection.json).

Import

With bun start running:

  1. Postman → Collections → ImportLink tab
  2. Paste http://localhost:4242/dobby-postman-collection.json

Or download the file and import it directly.

Layout

Dobby
├── Endpoints            GET /health, POST /api/booking, POST /api/search-link
├── Quick Start          hand-picked bookings (single, return, family, snap, …)
└── Examples
    ├── Misc             carrier-coverage smoke set + snap + unallocated
    ├── Routes           one booking per route (es, er, sncf, sncb, db, …)
    ├── Pax              same lon-par with varying pax + class
    └── Markets/         one folder per market
        ├── uk-en/       matrix of route × pax × class variations
        ├── fr-fr/
        └── …            (every supported market code)

The Examples folder mirrors docs/examples/batch/. Iterations from the batch examples are skipped — the HTTP server is one-shot.

Variable

Variable Default
DOBBY_SERVER http://localhost:4242

Change it once at the collection level and every request follows.

Pre-request script (collection-level)

Computes three date variables every request can use:

Variable Value
outboundDate today + 14 days
inboundDate today + 21 days
outboundDateSoon today + 3 days

So bookings stay valid no matter when you import or re-run.

Test script (collection-level)

Two pm.test() blocks run after every request:

  1. Request succeeded (2xx) — applies to every request.
  2. Response contains a PNR (bookingReference) — only runs when the URL ends with /api/booking.

Rebuild

bun run postman:build

Source of truth is scripts/build-postman.ts. Add new requests there; the JSON file is generated.