docs(connect): add @Failure 403 swagger annotation to connect/disconnect handlers#730
docs(connect): add @Failure 403 swagger annotation to connect/disconnect handlers#730Dumbris wants to merge 2 commits into
Conversation
…ation (spec 075 T025-T029)
Polish for the macOS TCC-safe Connect wizard (spec 075). The overall
GET /api/v1/connect listing already serialized the additive access_state/
remediation fields; this completes the REST contract:
- Add GET /api/v1/connect/{client}: on-demand single-client status that
reads the config at request time and resolves access_state to
accessible|absent|malformed|denied (the sole endpoint that may raise a
macOS App-Data prompt, scoped to user action). Unknown client -> 404;
a denial is reported in-band (200 + access_state="denied" + remediation).
- Map a permission-denied connect/disconnect (*connect.AccessError) to 403
carrying the remediation text, distinct from a generic 400 or 404.
- Docs: macOS "App Data privacy & Connect" note (cause + tccutil reset) in
docs/api/rest-api.md and a CLAUDE.md REST-payload note for the new fields.
- Regenerate oas/ (swagger + docs.go) for the new route.
Verification: go build personal + -tags server; go test -race
./internal/connect/... ./internal/httpapi/... green; golangci-lint v2
(connect + httpapi) 0 issues; scripts/test-api-e2e.sh 65/65 pass.
Related #696
…ect handlers The writeIfAccessDenied helper in handleConnectClient and handleDisconnectClient can return 403 when macOS TCC denies App-Data access, but the swagger godoc annotations did not declare this response. Add @failure 403 to both handlers and regenerate oas/swagger.yaml + oas/docs.go. Related #696
Deploying mcpproxy-docs with
|
| Latest commit: |
a21d7db
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a44ca38e.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-mcp-2994-403-swagger-ann.mcpproxy-docs.pages.dev |
…t/disconnect (MCP-2994) Fold the MCP-2994 review fix into the canonical Connect-polish PR: the connect/disconnect handlers now return 403 on a macOS App-Data permission denial, so document it in their godoc @failure annotations and regenerate oas/. Supersedes the redundant PR #730 (same change, minus the unrelated package-lock churn). Related #696 Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
Closing as folded into the canonical MCP-2832 PR #711. #730 was branched from I've cherry-picked the |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…ation (spec 075 T025-T029) (#711) * feat(connect): on-demand per-client status REST route + denied remediation (spec 075 T025-T029) Polish for the macOS TCC-safe Connect wizard (spec 075). The overall GET /api/v1/connect listing already serialized the additive access_state/ remediation fields; this completes the REST contract: - Add GET /api/v1/connect/{client}: on-demand single-client status that reads the config at request time and resolves access_state to accessible|absent|malformed|denied (the sole endpoint that may raise a macOS App-Data prompt, scoped to user action). Unknown client -> 404; a denial is reported in-band (200 + access_state="denied" + remediation). - Map a permission-denied connect/disconnect (*connect.AccessError) to 403 carrying the remediation text, distinct from a generic 400 or 404. - Docs: macOS "App Data privacy & Connect" note (cause + tccutil reset) in docs/api/rest-api.md and a CLAUDE.md REST-payload note for the new fields. - Regenerate oas/ (swagger + docs.go) for the new route. Verification: go build personal + -tags server; go test -race ./internal/connect/... ./internal/httpapi/... green; golangci-lint v2 (connect + httpapi) 0 issues; scripts/test-api-e2e.sh 65/65 pass. Related #696 * docs(connect): add @failure 403 swagger annotations for denied connect/disconnect (MCP-2994) Fold the MCP-2994 review fix into the canonical Connect-polish PR: the connect/disconnect handlers now return 403 on a macOS App-Data permission denial, so document it in their godoc @failure annotations and regenerate oas/. Supersedes the redundant PR #730 (same change, minus the unrelated package-lock churn). Related #696 Co-Authored-By: Paperclip <noreply@paperclip.ing> --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
Summary
Adds missing
@Failure 403swagger annotations to the connect/disconnect handlers inconnect.go.Fixes MCP-2994: swagger docs were missing the 403 response code for connect/disconnect handlers.
Changes
@Failure 403annotations to connect and disconnect handler functionsCo-Authored-By: Paperclip noreply@paperclip.ing