dashboard: /document/apidoc menu resource still exists in DB init, but the frontend route was removed - clicking it shows 404
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
db/init/mysql/schema.sql:1545still inserts the menu resource:
INSERT INTO `resource` VALUES ('1534585430311051264', '1534577121923309568', 'SHENYU.MENU.DOCUMENT.APIDOC', '', '/document/apidoc', '', 1, 0, 'api', ...
- The related dict entries are also still initialized (
db/init/mysql/schema.sql:1931-1933):API_DOC_GLOBAL_FLAG(global switch) and theapidocEnvoffline/online environment entries. db/upgrade/2.7.2-upgrade-2.7.3-mysql.sqlcontains no cleanup for this resource/dict.- In shenyu-dashboard,
src/common/router.jsno longer registers/document/apidoc. The route existed at tag2.7.1(pointing toroutes/Document/ApiDoc) and was removed afterwards, along with the page component.
Reproduction
- Deploy shenyu-admin 2.7.2+ (or master) and open the dashboard.
- Click the apiDoc menu under "Document".
- The page navigates to
/#/document/apidocand renders the 404 page.
Questions
- 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?
- 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? - 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.
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