feat(router): self-documenting 501 body for placeholder modules (PMS-125) #63
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pms-125-stub-bodies"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Not implemented yetJSON envelope for the remaining mounted placeholder (/api/v1/dispatch) with a per-module body that names the module, links the tracking issue (PMS-58 for dispatch), and lists the planned endpoint shape.module_stub_routes(StubModule)so future placeholders only need to declare aStubModuleliteral; the new{*rest}wildcard makes sub-paths (e.g./api/v1/dispatch/board) return the same 501 payload instead of falling through to a 404.tests/dispatch_stub.rs(root and sub-path cases) and add the test binary to the CI integration-tests step.Test plan
cargo fmt --all --checkcargo clippy --all-targets -- -D warningscargo check --all-targetscargo test --test dispatch_stub(new) plus the existing test suitehttp get http://($env.MOKOSH_HOST_BIND_IP):($env.MOKOSH_PORT)/api/v1/dispatchreturns 501 withmodule,tracking_issue,tracking_url,planned_endpointsCloses PMS-125.
Replace the generic `Not implemented yet` JSON envelope (F12) with a per-module body that names the module slug, links the YouTrack issue tracking the implementation, and lists the planned endpoint shape. An integrator hitting `/api/v1/dispatch` (the one remaining mounted placeholder) now sees the calendar story key (PMS-58), a one-line summary, and the planned dispatch-view endpoint without having to grep the source tree. The new `module_stub_routes(StubModule)` helper mounts `/` plus a `{*rest}` wildcard so sub-paths under the placeholder also return the same payload instead of falling through to a 404. Adds `tests/dispatch_stub.rs` (two `#[sqlx::test]` cases pinning the root and a sub-path response) and wires the test binary into the CI integration-tests step so the contract cannot silently regress. #PMS-125