Copilot commented on code in PR #10189:
URL: https://github.com/apache/gravitino/pull/10189#discussion_r2882908535


##########
server/src/main/java/org/apache/gravitino/server/web/rest/PolicyOperations.java:
##########
@@ -338,7 +337,7 @@ static PolicyDTO toDTO(PolicyEntity policy, 
Optional<Boolean> inherited) {
         PolicyDTO.builder()
             .withName(policy.name())
             .withComment(policy.comment())
-            
.withPolicyType(policy.policyType().name().toLowerCase(Locale.ROOT))
+            .withPolicyType(policy.policyType().name())

Review Comment:
   `toDTO` now sets `policyType` using `policy.policyType().name()`. For custom 
policies this will return `CUSTOM`, which changes the REST response from the 
previously-used `custom` value (and differs from what existing tests/clients 
send in requests). Consider keeping `custom` for `BuiltInType.CUSTOM` (e.g., 
use `policy.policyType().policyType()` for CUSTOM, and `name()` for other 
built-ins) to avoid a breaking API change for custom policies.
   ```suggestion
               .withPolicyType(policy.policyType().policyType())
   ```



-- 
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]

Reply via email to