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

rm-hull / next-departures-api / 25082276956

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

Pull #5

github

rm-hull
feat: add refdata endpoint for stop types

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)
```
Pull Request #5: feat: add refdata endpoint for stop types

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 TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc