juicewcode opened a new pull request, #7023:
URL: https://github.com/apache/shenyu/pull/7023
Fixes #6715
## Summary
- Reject AI proxy API key creation when the referenced selector does not
exist.
- Return `AdminConstants.ID_NOT_EXIST` before invoking the service.
- Preserve selector-based namespace derivation for valid selectors.
- Add controller unit tests for both valid and invalid selector cases.
## Test
- Added `AiProxyApiKeyControllerTest`.
- Covers:
- Missing selector returns `ID_NOT_EXIST` and does not call the create
service.
- Existing selector overwrites the DTO namespace and delegates creation.
- Tests were not executed, per task requirements; static checks were
completed.
<!-- 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]