mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #4311] [CLOSED] feat(api-docs): enhance API documentation with missing endpoints, search, collapse, syntax highlighting, and route sync test #5649
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5649
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/4311
Author: @abdalrahmanx9
Created: 5/12/2026
Status: ❌ Closed
Base:
main← Head:feat/api-docs-enhancements📝 Commits (5)
a141b4ffeat(api-docs): enhance API documentation with missing endpoints, search, collapse, and route sync test14604e0feat(api-docs): add JSON syntax highlighting and top-right copy button to code blocks2aeaaa9fix(api-docs): use distinct colors for JSON syntax highlighting (green strings, amber numbers)53b0593fix(graphs): increase y-axis paddingLeft from 32 to 56 to prevent clipped labels73b2d64fix(multi-node): scope tag and email unique constraints per node📊 Changes
11 files changed (+894 additions, -38 deletions)
View changed files
📝
database/db.go(+53 -0)📝
database/model/model.go(+2 -2)📝
frontend/src/components/Sparkline.vue(+1 -1)📝
frontend/src/pages/api-docs/ApiDocsPage.vue(+107 -9)➕
frontend/src/pages/api-docs/CodeBlock.vue(+152 -0)📝
frontend/src/pages/api-docs/EndpointRow.vue(+3 -6)📝
frontend/src/pages/api-docs/EndpointSection.vue(+63 -7)📝
frontend/src/pages/api-docs/endpoints.js(+236 -6)➕
web/controller/api_docs_test.go(+265 -0)📝
web/service/port_conflict.go(+10 -5)📝
xray/client_traffic.go(+2 -2)📄 Description
Summary
Enhance the in-panel API documentation page (
/panel/api-docs) with complete endpoint coverage, visual improvements, and a CI test to keep docs in sync.Changes
Complete endpoint coverage (29 previously undocumented routes added):
xrayMetricsState,xrayMetricsHistory,xrayObservatory,xrayObservatoryHistory/panel/setting/*routes/panel/xray/*routes/sub/:subid,/json/:subid,/clash/:subid/wsendpointAccuracy fixes:
netUp/netDownnotnetIn/netOut,load5/load15missing, node metrics limited tocpu/mem)getNewVlessEncdescription to reflect actual response shapeResponse schemas: Added example responses to 15+ key endpoints (inbound list, server status, traffic, logs, cert generators, etc.)
UI improvements:
CI / maintainability:
TestAPIRoutesDocumentedGo test scans all controller files for route registrations and verifies every route is documented inendpoints.js— run withgo test -run TestAPIRoutesDocumented🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.