Repository navigation
feat(api): add GET /routes machine-readable endpoint registry (#1289) - #1291
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
uteke-serve now serves the endpoint registry as JSON — method, path, tier, description, request/response types, and issues per route — serialized straight from api_registry::ENDPOINTS, the same single source of truth that generates docs/api-reference.md, so consumers can validate against the real contract instead of stale notes (GET vs POST, room_id vs room, body-vs-query params). mod api_registry is un-gated from the docgen feature (it is runtime data now); the registry entry is LAB tier so the CORE contract list is untouched; usage text, docgen grouping, and CHANGELOG updated; 3 new server tests cover payload shape, auth roles, and the 404 catch-all.
ajianaz
force-pushed
the
feat/1289-routes-introspection
branch
from
September 28, 2026 22:32
074f8fe to
f3a076f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GET /routesonuteke-servereturns the endpoint registry as JSON: for every route — method, path, tier (CORE/LAB), description, request/response type names, related issues. The payload is serialized directly fromapi_registry::ENDPOINTS, the same single source of truth thatdocgenrenders intodocs/api-reference.md.mod api_registryis un-gated from thedocgenfeature on both the bin and the lib target: the registry is runtime data now (served over HTTP), in addition to its docgen role./routesregistry entry is LAB tier — the CORE list indocs/core-contract.json(uteke-cloud contract) is unchanged; docgen groups/routesunder Health & Info;uteke-serveusage text updated; CHANGELOG entry added under [Unreleased].Why
#1289: the server exposed no machine-readable API description, so every consumer integration tripped over contract mismatches that live only in source code — GET vs POST confusion (
/room/statsand/doc/listare POST-only),room_idvsroom, body-vs-query parameter placement. Two false "missing feature" reports this week alone came from that class. A spec endpoint lets typed clients, MCP tool descriptions, and agent skill notes validate against the real contract instead of stale notes (issue option 2 — smallest lift, biggest payoff).Testing
cargo fmt --all -- --check✅cargo clippy --workspace --all-targets -- -D warnings— exit 0 ✅cargo test --workspace— exit 0, no failures (572 passed in uteke-server, including the 3 new tests) ✅check -p uteke-core --no-default-features --features vecq/--features onnx,vecq,build -p uteke-server --no-default-features --features vecq✅cargo run -p docgenregenerated docs (committed) ✅GET /routeswith read-only token → 200, 78 entries, self-listing with tierlab;POST /routes→ 404; CORE list incore-contract.jsonunchanged ✅Closes #1289