Aias00 opened a new issue, #719:
URL: https://github.com/apache/shenyu-dashboard/issues/719

   ## Background
   
   The `apache/shenyu` main repo is removing the **dead API-doc viewer 
backend** — `ApiDocController` (only `GET /apidoc/getDocMenus`) and 
`DOC_DEFINITION_MAP` (declared + returned, zero `put`, always empty), tracked 
in apache/shenyu#7592 and the missing-detail bug apache/shenyu#7593.
   
   The `shenyu-dashboard` `/document/apidoc` page is the **frontend 
counterpart** of that dead viewer. It still calls two endpoints that are about 
to disappear:
   
   - `GET /apidoc/getDocMenus`  ← `src/services/api.js:948` (`getDocMenus`), 
used by `src/routes/Document/ApiDoc.js:45`
   - `GET /apidoc/getDocItem`   ← `src/services/api.js:955` (`getDocItem`), 
**already unused** anywhere in the dashboard source
   
   Once the backend removes these endpoints, the dashboard page renders empty / 
404s. It must be removed in lock-step with the backend change.
   
   ## Scope (exact files to remove)
   
   | Location | Action |
   |---|---|
   | `src/common/router.js:265-270` | Remove the `"/document/apidoc"` route 
entry |
   | `src/common/menu.js:116-124` | Remove the `SHENYU.MENU.DOCUMENT` menu 
group (it has only the one `apidoc` child) |
   | `src/routes/Document/` | Delete the **entire** directory: `ApiDoc.js` + 
`components/` (`ApiContext`, `ApiDebug`, `ApiInfo`, `AddAndUpdateApiDoc`, 
`AddAndUpdateTag`, `HeadersEditor`, `ImportSwaggerModal`, `SearchApi`, 
`TagInfo`, `globalData`, `searchApiTree`, and their `*.test.js`) |
   | `src/services/api.js:948-951` | Remove `getDocMenus()` |
   | `src/services/api.js:955-958` | Remove `getDocItem()` (already dead) |
   | Locales (`src/locales/*`) | Remove the 11 `SHENYU.DOCUMENT.*` i18n keys |
   | `src/routes/Document/**/*.test.js` | Remove along with the page |
   
   ## Important: do NOT lose the live pipeline
   
   The `ImportSwaggerModal` inside `Document/` is **orphaned** — it is 
defined/exported but never imported by any rendered component, so it is already 
dead UI. Its backend call `/swagger/import` is the live publish pipeline, but 
that pipeline is **already covered** by the separate, still-present MCP server 
UI: `src/routes/Plugin/McpServer/SwaggerImportModal.js` (calls 
`/swagger/import/mcp`).
   
   ➡️ Removing the `Document/` page therefore loses **no live functionality**. 
Before deleting, confirm with `apache/shenyu` maintainers that the backend 
`/swagger/import` endpoint itself stays (it should — apache/shenyu#7592 scope 
is *viewer only*, not the publish pipeline).
   
   ## Acceptance criteria
   
   - [ ] `/document/apidoc` route and menu entry are gone; no dangling imports.
   - [ ] `apidoc/getDocMenus` and `apidoc/getDocItem` requests are removed from 
`src/services/api.js`.
   - [ ] No remaining reference to `SHENYU.DOCUMENT.*` in source or locale 
files.
   - [ ] `yarn build` / `npm run build` passes with no unresolved import.
   - [ ] Swagger→registry / MCP publish still usable via the MCP server 
`SwaggerImportModal`.
   
   ## Cross-repo coordination
   
   - Backend removal: apache/shenyu#7592 (refactor: remove dead API-doc viewer) 
and apache/shenyu#7593 (missing `getDocItem` detail endpoint).
   - This dashboard issue should be closed only after the backend PR for #7592 
lands, to avoid a window where the dashboard calls endpoints that no longer 
exist (or, alternatively, land both in the same release train).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to