[PR #3519] add OpenAPI annotations to tui.ts control endpoints #10680

Closed
opened 2026-02-16 18:15:24 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3519

State: closed
Merged: Yes


I found that the two endpoints defined in tui.ts were not included in the openapi spec.

This small change ensures /tui/control/next and /tui/control/response endpoints are included in the generated OpenAPI specification

Details

The TUI control endpoints were missing from the OpenAPI specification because they lacked proper documentation annotations. This PR adds:

  • Zod schema definition for the TUI request type
  • OpenAPI describeRoute metadata for both endpoints
  • Proper request validation using the validator middleware for the POST endpoint

Testing

Verified that the endpoints now appear in the generated OpenAPI spec by running:

bun run src/index.ts generate

Both endpoints are now properly documented with operation IDs tui.control.next and tui.control.response.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3519 **State:** closed **Merged:** Yes --- I found that the two endpoints defined in `tui.ts` were not included in the openapi spec. This small change ensures `/tui/control/next` and `/tui/control/response` endpoints are included in the generated OpenAPI specification ## Details The TUI control endpoints were missing from the OpenAPI specification because they lacked proper documentation annotations. This PR adds: - Zod schema definition for the TUI request type - OpenAPI `describeRoute` metadata for both endpoints - Proper request validation using the `validator` middleware for the POST endpoint ## Testing Verified that the endpoints now appear in the generated OpenAPI spec by running: ```bash bun run src/index.ts generate ``` Both endpoints are now properly documented with operation IDs `tui.control.next` and `tui.control.response`.
yindo added the pull-request label 2026-02-16 18:15:24 -05:00
yindo closed this issue 2026-02-16 18:15:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10680