• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / next-departures-api / 25082875742

28 Apr 2026 11:25PM UTC coverage: 18.662% (+0.1%) from 18.549%
25082875742

push

github

web-flow
feat: add refdata endpoint for stop types (#5)

Introduces a new API route `/v1/next-departures/refdata/stop-types` to
provide metadata about transport stop types.

- Embeds static reference data from `stop-types.json` using `go:embed`.
- Returns a list of codes, descriptions, and categories (e.g., **bus**,
**rail**, **metro**).
- Facilitates client-side filtering and labeling of NaPTAN stops.

```mermaid
sequenceDiagram
    participant Client
    participant API as API Server
    participant Routes
    participant Models

    Client->>API: GET /v1/.../refdata/stop-types
    API->>Routes: StopTypes(context)
    Routes->>Models: Access global StopTypes
    Models-->>Routes: []StopType (unmarshaled from embedded JSON)
    Routes-->>Client: 200 OK (JSON array)
```

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

3 of 11 new or added lines in 3 files covered. (27.27%)

159 of 852 relevant lines covered (18.66%)

0.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cmd/api_server.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc