[PR #2503] [MERGED] refactor: use embed fs for redoc UI and update to latest version #8316

Closed
opened 2026-04-20 18:08:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/2503
Author: @tink-bot
Created: 3/30/2026
Status: Merged
Merged: 3/30/2026
Merged by: @kolaente

Base: mainHead: refactor/redoc-embed-fs


📝 Commits (1)

  • 5e5d402 refactor: use embed fs for redoc UI and update to latest version

📊 Changes

4 files changed (+1859 additions, -1830 deletions)

View changed files

📝 pkg/routes/api/v1/docs.go (+11 -1830)
pkg/routes/api/v1/redoc/redoc.html (+14 -0)
pkg/routes/api/v1/redoc/redoc.standalone.js (+1832 -0)
📝 pkg/routes/routes.go (+2 -0)

📄 Description

The redoc HTML and JS were inlined as a giant Go string const in docs.go (~1830 lines). This moves them into separate files under pkg/routes/api/v1/redoc/ using Go's //go:embed directive, and updates redoc.standalone.js to the latest version.

The JS bundle is now served on its own route (/api/v1/docs/redoc.standalone.js) so the HTML and JS are cleanly separated.

Closes #2465.


🔄 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/go-vikunja/vikunja/pull/2503 **Author:** [@tink-bot](https://github.com/tink-bot) **Created:** 3/30/2026 **Status:** ✅ Merged **Merged:** 3/30/2026 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `refactor/redoc-embed-fs` --- ### 📝 Commits (1) - [`5e5d402`](https://github.com/go-vikunja/vikunja/commit/5e5d402451c47c161c363aef082f76890068f9de) refactor: use embed fs for redoc UI and update to latest version ### 📊 Changes **4 files changed** (+1859 additions, -1830 deletions) <details> <summary>View changed files</summary> 📝 `pkg/routes/api/v1/docs.go` (+11 -1830) ➕ `pkg/routes/api/v1/redoc/redoc.html` (+14 -0) ➕ `pkg/routes/api/v1/redoc/redoc.standalone.js` (+1832 -0) 📝 `pkg/routes/routes.go` (+2 -0) </details> ### 📄 Description The redoc HTML and JS were inlined as a giant Go string const in docs.go (~1830 lines). This moves them into separate files under `pkg/routes/api/v1/redoc/` using Go's `//go:embed` directive, and updates redoc.standalone.js to the latest version. The JS bundle is now served on its own route (`/api/v1/docs/redoc.standalone.js`) so the HTML and JS are cleanly separated. Closes #2465. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 18:08:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#8316