fix(webrtc): swagger annotations for WHEP routes (closes #3) #7

Closed
zgaetano wants to merge 0 commits from fix/issue-3-swagger-annotations into m2-webrtc-core-integration
Owner

Closes #3.

WHEP Subscribe and Unsubscribe had no @Summary / @Router annotations, so /api/swagger/index.html didn't list them. Adds the standard annotations (matching the upstream rtmp.go / srt.go pattern) and regenerates docs/docs.go, docs/swagger.json, docs/swagger.yaml via make swagger.

After: swagger.json exposes both:

"/api/v3/whep/{id}"
"/api/v3/whep/{id}/{resource}"

Stacks on m2-webrtc-core-integration so it lands without depending on M3 (PR #5) or the issue-#2 fix (PR #6).

Co-authored with Claude Opus 4.7.

Closes #3. WHEP `Subscribe` and `Unsubscribe` had no `@Summary` / `@Router` annotations, so `/api/swagger/index.html` didn't list them. Adds the standard annotations (matching the upstream `rtmp.go` / `srt.go` pattern) and regenerates `docs/docs.go`, `docs/swagger.json`, `docs/swagger.yaml` via `make swagger`. After: `swagger.json` exposes both: ``` "/api/v3/whep/{id}" "/api/v3/whep/{id}/{resource}" ``` Stacks on `m2-webrtc-core-integration` so it lands without depending on M3 (PR #5) or the issue-#2 fix (PR #6). Co-authored with Claude Opus 4.7.
zgaetano added 1 commit 2026-05-03 08:12:16 -04:00
fix(webrtc): swagger annotations for WHEP routes, regenerate docs (closes #3)
Some checks failed
tests / build (push) Failing after 1s
tests / build (pull_request) Failing after 2s
c8bcf75227
The WHEP routes were mounted by http/server.go via the app/webrtc
Handler.Register(), but Subscribe and Unsubscribe carried no swag
annotations. The Swagger UI at /api/swagger/index.html therefore
didn't list /api/v3/whep/* — programmatic API consumers and humans
browsing the docs couldn't discover the endpoints.

Adds the standard upstream-shaped @Summary / @Tags / @ID / @Router
annotations on Subscribe and Unsubscribe (matching the rtmp.go and
srt.go pattern) and regenerates docs/{docs.go,swagger.json,swagger.yaml}
via 'make swagger'. Verified: swagger.json now contains both paths,
swagger UI renders them under the v16.16.0 tag.

Closes #3.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Author
Owner

Merged into main via direct push as part of the v0.1.0-dragonfork release. Branch commits are reachable from main; closing this PR. Release: https://forge.wilddragon.net/zgaetano/datarhei-dragonfork-core/releases/tag/v0.1.0-dragonfork

Merged into `main` via direct push as part of the v0.1.0-dragonfork release. Branch commits are reachable from main; closing this PR. Release: https://forge.wilddragon.net/zgaetano/datarhei-dragonfork-core/releases/tag/v0.1.0-dragonfork
zgaetano closed this pull request 2026-05-03 08:28:57 -04:00
Some checks failed
tests / build (push) Failing after 1s
tests / build (pull_request) Failing after 2s

Pull request closed

Sign in to join this conversation.
No reviewers
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#7
No description provided.