Jimmyweng006 opened a new pull request, #8307: URL: https://github.com/apache/ozone/pull/8307
## What changes were proposed in this pull request? Add maxKey validation for S3 listObjects function 1. Why use a custom validation function instead of @Min for the maxKeys parameter? - The @Min annotation only works at the HTTP layer and does not trigger when calling BucketEndpoint.get() directly in Java unit tests. - On validation failure, @Min typically returns a 404 (Not Found), which is not compatible with the AWS S3 standard (should return 400 Bad Request). 2. Why use direct REST endpoint testing instead of the AWS S3 SDK? - The AWS S3 Java SDK performs client-side validation and blocks requests with illegal parameters (such as maxKeys < 0), so these requests are never sent to the server. - As a result, we cannot use the SDK to test how the server handles invalid parameters; direct REST requests are required to fully validate server-side behavior. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-12870 ## How was this patch tested? Unit Test and Integration Test -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org