Skip to content

[Parity Gap] Orphaned handler: Missing route registration for Situation endpoint (/api/where/situation/{id}.json) #798

@tejasva-vardhan

Description

@tejasva-vardhan

Describe the bug / gap

While auditing the REST API surface area for parity between the legacy Java server (onebusaway-api-webapp) and Maglev, I noticed that a 404 Not Found is returned when trying to fetch a specific service alert via the standalone Situation endpoint.

Upon further inspection of the codebase, the handler logic actually exists (internal/restapi/situation_handler.go) and has tests (situation_handler_test.go), but it was never wired up in internal/restapi/routes.go.

Expected Behavior

A GET request to /api/where/situation/{id}.json should invoke the existing situationHandler and return the specific situation matching the ID, instead of a 404.

Proposed Solution

I will register the missing route GET /api/where/situation/{id}.json in routes.go to point to the existing handler, and verify the output schema against the legacy Java server using maglev-validator. I'll open a PR for this shortly! 🚀

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions