M2: WHEP route mounted on /api/v3/whep/:id — Swagger docs don't list it #3

Closed
opened 2026-05-03 01:04:40 -04:00 by zgaetano · 0 comments
Owner

http/server.go mounts the WebRTC handler via s.v3handler.webrtc.Register(v3) which adds POST /api/v3/whep/:id and DELETE /api/v3/whep/:id/:peerid. They serve correctly — verified against the live deploy.

Swagger UI (/api/swagger/index.html) does not show these routes because docs/docs.go was generated from upstream and hasn't been regenerated since the M2 routes were added. Programmatic API consumers and humans browsing the docs won't discover the WHEP path.

Repro

curl -s http://10.0.0.25:8090/api/swagger/doc.json | jq '.paths | keys[]' | grep -i whep
# (empty)

Fix (M4 / docs polish)

Add Swagger annotations on app/webrtc.Handler.Subscribe and Unsubscribe, then run make swagger (or whatever the existing toolchain uses — see upstream's Makefile). Re-commit regenerated docs/docs.go, swagger.json, swagger.yaml.

Severity

Documentation only. The endpoint works.

`http/server.go` mounts the WebRTC handler via `s.v3handler.webrtc.Register(v3)` which adds `POST /api/v3/whep/:id` and `DELETE /api/v3/whep/:id/:peerid`. They serve correctly — verified against the live deploy. Swagger UI (`/api/swagger/index.html`) does **not** show these routes because `docs/docs.go` was generated from upstream and hasn't been regenerated since the M2 routes were added. Programmatic API consumers and humans browsing the docs won't discover the WHEP path. ## Repro ``` curl -s http://10.0.0.25:8090/api/swagger/doc.json | jq '.paths | keys[]' | grep -i whep # (empty) ``` ## Fix (M4 / docs polish) Add Swagger annotations on `app/webrtc.Handler.Subscribe` and `Unsubscribe`, then run `make swagger` (or whatever the existing toolchain uses — see upstream's `Makefile`). Re-commit regenerated `docs/docs.go`, `swagger.json`, `swagger.yaml`. ## Severity Documentation only. The endpoint works.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: zgaetano/datarhei-dragonfork-core#3
No description provided.