[PR #790] [CLOSED] feat(server): add swagger ui support for api documentation #9713

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/790
Author: @braden-w
Created: 7/9/2025
Status: Closed

Base: devHead: feat/swagger-ui-support


📝 Commits (3)

  • dccf887 feat(server): add swagger ui support for api documentation
  • 7d66517 Merge remote-tracking branch 'origin/dev' into feat/swagger-ui-support
  • c5dcda4 chore(deps): add @hono/swagger-ui dependency version 0.5.2 to project

📊 Changes

3 files changed (+150 additions, -150 deletions)

View changed files

📝 bun.lock (+147 -150)
📝 packages/opencode/package.json (+1 -0)
📝 packages/opencode/src/server/server.ts (+2 -0)

📄 Description

This PR adds Swagger UI support to the opencode server, providing an interactive API documentation interface.

Changes

  • Added @hono/swagger-ui dependency
  • Integrated Swagger UI middleware at /ui endpoint
  • UI automatically reads from existing OpenAPI spec at /doc

Implementation

I followed the standard Hono Swagger UI documentation approach as shown in their official examples. This provides a clean, minimal integration that leverages our existing OpenAPI specification.

Proposal: support both Swagger UI and Scalar UI

See also #791 which implements Scalar UI on /scalar as an alternative documentation interface. Both UIs can coexist without conflict.

I believe we could support both documentation UIs simultaneously:

  • Swagger UI at /ui - The industry standard that most developers are familiar with
  • Scalar UI at /scalar - A modern alternative with enhanced features

This would give users choice based on their preferences and use cases.

What do you think? Should we support both, or would you prefer to choose one? I'm open to discussion!

CleanShot 2025-07-08 at 21 58 36


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/790 **Author:** [@braden-w](https://github.com/braden-w) **Created:** 7/9/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/swagger-ui-support` --- ### 📝 Commits (3) - [`dccf887`](https://github.com/anomalyco/opencode/commit/dccf887885d6969c07bd4608f0529e2f10f1ee19) feat(server): add swagger ui support for api documentation - [`7d66517`](https://github.com/anomalyco/opencode/commit/7d66517148081069542f9ed07d30b5842d9d426d) Merge remote-tracking branch 'origin/dev' into feat/swagger-ui-support - [`c5dcda4`](https://github.com/anomalyco/opencode/commit/c5dcda428d4b9e8016b65e062fbc86b458a3afe2) chore(deps): add @hono/swagger-ui dependency version 0.5.2 to project ### 📊 Changes **3 files changed** (+150 additions, -150 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+147 -150) 📝 `packages/opencode/package.json` (+1 -0) 📝 `packages/opencode/src/server/server.ts` (+2 -0) </details> ### 📄 Description This PR adds Swagger UI support to the opencode server, providing an interactive API documentation interface. ## Changes - Added `@hono/swagger-ui` dependency - Integrated Swagger UI middleware at `/ui` endpoint - UI automatically reads from existing OpenAPI spec at `/doc` ## Implementation I followed the standard Hono Swagger UI documentation approach as shown in their [official examples](https://hono.dev/examples/swagger-ui). This provides a clean, minimal integration that leverages our existing OpenAPI specification. ## Proposal: support both Swagger UI and Scalar UI See also #791 which implements Scalar UI on `/scalar` as an alternative documentation interface. Both UIs can coexist without conflict. I believe we could support both documentation UIs simultaneously: - **Swagger UI** at `/ui` - The industry standard that most developers are familiar with - **Scalar UI** at `/scalar` - A modern alternative with enhanced features This would give users choice based on their preferences and use cases. What do you think? Should we support both, or would you prefer to choose one? I'm open to discussion! ![CleanShot 2025-07-08 at 21 58 36](https://github.com/user-attachments/assets/32ae25d8-1203-4d62-890e-dbc64febf30b) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:02 -05:00
yindo closed this issue 2026-02-16 18:14:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9713