juicewcode opened a new pull request, #7017:
URL: https://github.com/apache/shenyu/pull/7017
Fixes #6716
## Summary
- Invoke `register` after a successful API creation so the related
selector/rule/metadata data is published.
- Invoke `removeRegister` after successful API deletion.
- Apply the same cleanup when deleting APIs by path, HTTP method, and RPC
type.
- Guard registration when required API extension data is missing.
- Add unit tests for cleanup and non-existent API deletion.
## Test
- Added `testDeleteCleansRegisteredResources` to verify rule, selector,
and metadata cleanup.
- Added `testDeleteWhenApiDoesNotExist` to verify the expected missing-API
response.
- Existing API create/update/find/list tests remain applicable.
<!-- Describe your PR here; e.g. Fixes #issueNo -->
<!--
Thank you for proposing a pull request. This template will guide you through
the essential steps necessary for a pull request.
-->
Make sure that:
- [x] You have read the [contribution
guidelines](https://shenyu.apache.org/community/contributor-guide).
- [x] You submit test cases (unit or integration tests) that back your
changes.
- [x] Your local test passed `./mvnw clean install
-Dmaven.javadoc.skip=true`.
--
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]