BobSong-dev opened a new pull request, #7170: URL: https://github.com/apache/shenyu/pull/7170
Fixes #6617 ## Background `ResourceController.createResource` validates its request body, but `updateResource` did not annotate `ResourceDTO` with `@Valid`. As a result, invalid resource updates could bypass the DTO bean validation rules and reach the service layer. ## Changes - Add `@Valid` to the `ResourceDTO` parameter of `updateResource`. - Add a regression test covering an invalid update request body. - Verify that the update service is not called when validation fails. - Update the existing success test fixture to provide the `ResourceMapper` required by the `@Existed` path variable validator. ## Verification - `ResourceControllerTest`: 12 tests passed. - Checkstyle: 0 violations. - `git diff --check`: passed. -- 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]
