Problem
The indexer serves /api/openapi.yaml and the repository depends on swagger-jsdoc/swagger-ui-express, but nothing verifies that the published specification matches the routes that actually exist. Given the very large API surface and the presence of stub/unmounted routers elsewhere in the repository, the spec can silently drift from reality, which misleads the frontend and any external integrator.
What needs to be done
- Determine whether the spec is generated from annotations or maintained by hand.
- Add a CI check that fails when the implemented routes and the published spec disagree (for example by generating the spec and diffing it against the committed artifact, or by reusing the existing route-validation tooling).
- Ensure endpoints that are experimental or return mock data are marked as such in the spec (coordinate with the mock-data issue).
- Document how to regenerate the spec.
Files
indexer/src/api.js (spec route)
.github/workflows/ci.yml
docs/
Acceptance deliverables
- The published OpenAPI spec provably matches the implemented routes.
- Drift fails CI.
Tests to pass
- The spec-drift check passes on the current
main and fails when a route is added without a spec update.
Problem
The indexer serves
/api/openapi.yamland the repository depends onswagger-jsdoc/swagger-ui-express, but nothing verifies that the published specification matches the routes that actually exist. Given the very large API surface and the presence of stub/unmounted routers elsewhere in the repository, the spec can silently drift from reality, which misleads the frontend and any external integrator.What needs to be done
Files
indexer/src/api.js(spec route).github/workflows/ci.ymldocs/Acceptance deliverables
Tests to pass
mainand fails when a route is added without a spec update.