yangjj-iso opened a new pull request, #7603:
URL: https://github.com/apache/shenyu/pull/7603

   Fixes #7592.
   Companion frontend source change: 
https://github.com/apache/shenyu-dashboard/pull/720
   
   `DocManagerImpl.listAll()` reads a cache that is never populated. Remove 
`ApiDocController`, its test, the unused viewer response models, and the 
`DOC_DEFINITION_MAP` / `listAll()` contract. Keep `addDocInfo`, Swagger 
parsing/import, API-document registration, client registration, and MCP 
generation intact. Strengthen the registration test to check the published DTO, 
callback checksum, and unchanged-document handling.
   
   ### Why the existing page and menu remain
   
   The current dashboard page still provides database-backed API/tag management 
through `/api` and `/tag`, as well as Swagger import and request debugging. Its 
tree is loaded independently of the empty legacy cache. The legacy response 
also supplies debug environments that the page actively consumes. Deleting the 
entire page/menu as originally proposed would therefore remove working 
functionality.
   
   The companion frontend change reads enabled environments from the existing 
`/shenyu-dict/all/apidocEnv` endpoint and removes the obsolete `getDocMenus` / 
`getDocItem` helpers. This PR preserves menu/permission records and ships the 
corresponding changes in the embedded dashboard. Only the API service and 
API-document page modules are replaced; the other 2,362 compiled modules remain 
identical to the current upstream bundle. The original modules were checked 
against the frontend source baseline after normalizing local identifier names.
   
   For independently deployed dashboards, deploy the companion frontend change 
before upgrading the backend that removes `/apidoc/getDocMenus`.
   
   ### Validation
   
   - Rebased onto current upstream `master`; this PR contains one scoped commit.
   - 41 focused Maven tests passed, with Checkstyle enabled, covering document 
registration/parsing, Swagger/MCP import, the API-doc subscriber, and 
API/tag/dictionary controllers.
   - `./mvnw -B -pl shenyu-admin apache-rat:check`: passed.
   - Companion dashboard: 6 suites / 21 tests, changed-file ESLint, and 
production build passed.
   - Embedded bundle: JavaScript syntax, enabled-environment mapping, preserved 
Swagger/MCP request routes, removal of legacy helpers, and module-scope checks 
passed.
   - Full repository install and Docker integration/e2e suites were not run.
   
   Maven test command:
   
   ```sh
   ./mvnw -B -pl shenyu-admin -am test \
     
-Dtest=DocManagerImplTest,SwaggerDocParserTest,SwaggerDocManagerImplTest,SwaggerImportServiceTest,SwaggerImportServiceImplTest,SwaggerImportControllerTest,ApiDocExecutorSubscriberTest,ShenyuDictControllerTest,ApiControllerTest,TagControllerTest
 \
     -Dsurefire.failIfNoSpecifiedTests=false \
     -Dmaven.javadoc.skip=true -Djacoco.skip=true
   ```
   
   - [x] Read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide/).
   - [x] Submit test cases that back the changes.
   - [ ] Full local `./mvnw clean install -Dmaven.javadoc.skip=true` passed 
(focused validation above).
   


-- 
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