Skip to content

[ISSUE #7593] Restore persisted api document menus and detail. - #7601

Closed
yangjj-iso wants to merge 1 commit into
apache:masterfrom
yangjj-iso:fix/7593-api-doc-detail
Closed

yangjj-iso wants to merge 1 commit into
apache:masterfrom
yangjj-iso:fix/7593-api-doc-detail

Conversation

@yangjj-iso

@yangjj-iso yangjj-iso commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #7603. This PR is the alternative repair approach and is closed to avoid reintroducing the legacy viewer endpoints removed there.

The selected removal approach retains database-backed API/tag management, existing API details, Swagger import, MCP generation and request debugging. Issue #7593 is addressed through its documented removal option by #7603; this repair branch is retained for reference.

Original repair proposal

Restore GET /apidoc/getDocItem?id=... and read the document viewer's menu and detail from the persisted api.document data. The menu previously used an unwritten in-memory map and the detail endpoint was missing.

Menu leaves now contain database API ids, which the detail endpoint uses to return the stored DocItem. Group persisted Swagger documents by context path and module, preserve module/API ordering, and skip malformed or incompatible records. Updates and deletions are visible on the next read without requiring re-import. The viewer consumes legacy DocItem documents; OpenAPI-operation payloads remain available through the existing /api/{id} detail route.

Validation:

  • 31 tests passed, including controller route/response coverage, document-manager tests, and an H2 test covering persisted menu/detail, document updates, and deletion.
  • Swagger import and parser tests passed, including the existing MCP import coverage.
  • Checkstyle passed across the 34-module admin dependency reactor.
  • shenyu-admin Apache RAT check passed.
./mvnw -pl shenyu-admin -am test -Dtest=ApiDocControllerTest,DocManagerImplTest,ApiMapperTest,SwaggerImportServiceTest,SwaggerImportServiceImplTest,SwaggerDocParserTest -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.javadoc.skip=true -Djacoco.skip=true -Drat.skip=true
./mvnw -pl shenyu-admin apache-rat:check
  • I have read the contribution guidelines.
  • Test cases back the changes.
  • Full repository ./mvnw clean install -Dmaven.javadoc.skip=true (targeted validation above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant