shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

dashboard: /document/apidoc menu resource still exists in DB init, but the frontend route was removed - clicking it shows 404

Open Chrisp12138 opened this issue 3 weeks ago • 1 comments

Environment

  • Apache ShenYu 2.7.2 (fresh deployment), also reproducible against current master init data
  • shenyu-dashboard built from current master (post 2.7.1)

Issue

The dashboard still renders the "Document / apiDoc" menu, but navigating to it shows the 404 exception page. The DB keeps the menu resource while the dashboard frontend no longer contains the route.

Evidence

  1. db/init/mysql/schema.sql:1545 still inserts the menu resource:
INSERT INTO `resource` VALUES ('1534585430311051264', '1534577121923309568', 'SHENYU.MENU.DOCUMENT.APIDOC', '', '/document/apidoc', '', 1, 0, 'api', ...
  1. The related dict entries are also still initialized (db/init/mysql/schema.sql:1931-1933): API_DOC_GLOBAL_FLAG (global switch) and the apidocEnv offline/online environment entries.
  2. db/upgrade/2.7.2-upgrade-2.7.3-mysql.sql contains no cleanup for this resource/dict.
  3. In shenyu-dashboard, src/common/router.js no longer registers /document/apidoc. The route existed at tag 2.7.1 (pointing to routes/Document/ApiDoc) and was removed afterwards, along with the page component.

Reproduction

  1. Deploy shenyu-admin 2.7.2+ (or master) and open the dashboard.
  2. Click the apiDoc menu under "Document".
  3. The page navigates to /#/document/apidoc and renders the 404 page.

Questions

  1. Was the API-doc frontend intentionally removed (e.g. superseded by other tooling such as the MCP / Swagger-import flows), leaving the DB menu resource as an oversight?
  2. If intentional: should the menu resource and dict entries be removed from db/init/mysql/schema.sql (and handled via an upgrade SQL) so fresh deployments do not show a dead menu?
  3. If the page is planned to be reworked: is there an existing issue/PR tracking it?

Happy to prepare a PR that removes the stale menu resource and dict entries from the init SQL (plus an upgrade migration) if that is the preferred direction.

Chrisp12138 avatar Nov 13 '26 03:11 Chrisp12138

I have submitted a PR addressing this issue.

The changes remove the obsolete API documentation menu resources and their associated permission records from database initialization scripts. Cleanup SQL has also been added to the upgrade scripts for all supported database dialects.

API documentation dictionary configuration and backend functionality have been preserved.

I have also added regression coverage for the migration cleanup. The focused InstanceInfoUpsertTest passes successfully (5 tests).

PR: https://github.com/apache/shenyu/pull/8493

yashdotdev13 avatar Nov 15 '26 04:11 yashdotdev13