[PR #791] [CLOSED] feat(server): add scalar ui support for api documentation #9715

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/791
Author: @braden-w
Created: 7/9/2025
Status: Closed

Base: devHead: feat/scalar-ui-support


📝 Commits (2)

  • f8581f9 feat(server): add scalar ui support for api documentation
  • 65071e0 Merge remote-tracking branch 'origin/dev' into feat/scalar-ui-support

📊 Changes

3 files changed (+18 additions, -2 deletions)

View changed files

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

📄 Description

This PR adds Scalar UI support to the opencode server as a modern alternative to traditional API documentation interfaces.

Changes

  • Added @scalar/hono-api-reference dependency
  • Integrated Scalar middleware at /ui endpoint (can be changed to /scalar)
  • UI automatically reads from existing OpenAPI spec at /doc

Implementation

Following the standard Hono integration approach from Scalar's official documentation, this provides a minimal one-line integration that leverages our existing OpenAPI specification.

Proposal: support both Swagger UI and Scalar UI

See also #790 which implements Swagger UI on /ui. I propose we support both interfaces simultaneously, but I'm open to changes:

  • Swagger UI at /ui - The familiar, industry-standard interface
  • Scalar UI at /scalar - Modern UI with dark mode, better search, and enhanced UX

I think supporting both could be really interesting for future documentation needs, but I'm also happy to go with whatever the team prefers. What do you guys think?

image


🔄 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/791 **Author:** [@braden-w](https://github.com/braden-w) **Created:** 7/9/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/scalar-ui-support` --- ### 📝 Commits (2) - [`f8581f9`](https://github.com/anomalyco/opencode/commit/f8581f984d1b3409f816d9cf5324c4015091cc11) feat(server): add scalar ui support for api documentation - [`65071e0`](https://github.com/anomalyco/opencode/commit/65071e0fcfd353d0bc33679c4cf4b650d13be03a) Merge remote-tracking branch 'origin/dev' into feat/scalar-ui-support ### 📊 Changes **3 files changed** (+18 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+15 -2) 📝 `packages/opencode/package.json` (+1 -0) 📝 `packages/opencode/src/server/server.ts` (+2 -0) </details> ### 📄 Description This PR adds Scalar UI support to the opencode server as a modern alternative to traditional API documentation interfaces. ## Changes - Added `@scalar/hono-api-reference` dependency - Integrated Scalar middleware at `/ui` endpoint (can be changed to `/scalar`) - UI automatically reads from existing OpenAPI spec at `/doc` ## Implementation Following the standard Hono integration approach from [Scalar's official documentation](https://guides.scalar.com/scalar/scalar-api-references/integrations/hono), this provides a minimal one-line integration that leverages our existing OpenAPI specification. ## Proposal: support both Swagger UI and Scalar UI See also #790 which implements Swagger UI on `/ui`. I propose we support both interfaces simultaneously, but I'm open to changes: - **Swagger UI** at `/ui` - The familiar, industry-standard interface - **Scalar UI** at `/scalar` - Modern UI with dark mode, better search, and enhanced UX I think supporting both could be really interesting for future documentation needs, but I'm also happy to go with whatever the team prefers. What do you guys think? ![image](https://github.com/user-attachments/assets/e81176a6-a864-471f-978c-edc86168538a) --- <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#9715